string str=@"F:\Test\Codes\code.txt";
int x=str.LastIndexOf("\\");
string str1=str.substring(0,x);
string str2=str.substring(x)
转载于:https://www.cnblogs.com/plaqin/archive/2009/08/20/1550654.html
转载于:https://www.cnblogs.com/plaqin/archive/2009/08/20/1550654.html