C# 分割文件路径

string str=@"F:\Test\Codes\code.txt";
int x=str.LastIndexOf("\\");
string str1=str.substring(0,x);
string str2=str.substring(x)
posted @ 2009-08-20 14:43  Jeno  阅读(2397)  评论(0)    收藏  举报