Geo-Web

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2011-7-19

如何获取文件后缀名

filepath.Substring(filepath.LastIndexOf(".") + 1, filepath.Length - filepath.LastIndexOf(".") - 1)

2011-7-20

拓展到如何获取特定符号后面的字符串

string pStr;

string pChr;

.........

pStr.Substring(pStr.LastIndexOf(pChr) + 1, pStr.Length-pStr.LastIndexOf(pChr) - 1)

静态变量

类的所有实例拥有使用唯一的静态变量,公私都可以;但是,静态函数里不能使用非静态成员,如非静态变量、非静态函数等。

posted on 2011-07-19 18:33  Geo-Web  阅读(108)  评论(0)    收藏  举报