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

浙公网安备 33010602011771号