1、string.ToUpper():将字符转为大写2、string.IndexOf(string sub)>=0 :字符串查找 在string中查找sub。如果找到则反馈大于0的值3、Split:字符串分割 string[]info=string.Split(','); 将string字符串,按照‘,’分隔符,分割成若干个字符串数组info4、字符替换 stringsql=string.Format(@"aaaaa'{1}',bbbbbb{2},cccccc{3},ddddd{3},eeeee{2}","第一个字符参数&qu Read More
posted @ 2011-10-11 14:57 SouthAurora Views(226) Comments(0) Diggs(0) Edit
一、文件目录相关 1、GetFiles:取目录下的文件 string[]filenames=Directory.GetFiles(budgetpath); 2、Path.GetExtension(filename):返回值:文件的扩展名,有“.” 二、文本文件操作 1、File.ReadAllLines:将文本所有行读到一个字符串数组中,例如:string[]pbsFiles=File.ReadAllLines(sPBSContentFile,Encoding.GetEncoding("gb2312")); 2、System.IO.Path.GetExtension(tbF Read More
posted @ 2011-10-11 14:57 SouthAurora Views(230) Comments(0) Diggs(0) Edit