.net3.0新特性

 public static class LinqExtendTest
    {
       public static int wordCount(this String str)
       {
           return str.Split(' ').Length;
       }

       public static string TMatch(this string str,this string regStr)
       {


           return Regex.Match(str, regStr).Value;
       


         

       }
    }

posted @ 2011-12-12 00:50  咸鱼公子  Views(137)  Comments(0Edit  收藏  举报