C#如何截取以下的字符串 F:\WinForm\AutoUpde\AutoUpde\bin\Debug\AutoUpde.EXE如何截取成F:\WinForm\AutoUpde\AutoUpde\bin\Debug\ 即是不要最後的AutoUpde.EXE? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 原來這麼簡單,自己搞定了string SavePathTemp = Application.ExecutablePath; string SavePath = Application.ExecutablePath.Substring(0, SavePathTemp.LastIndexOf("\\")); string filePath = @"F:\WinForm\AutoUpde\AutoUpde\bin\Debug\AutoUpde.EXE"; string name= System.IO.Path.GetFileName(filePath); string Path = filePath.Substring(0, filePath.LastIndexOf(name)); string filePath = @"F:\WinForm\AutoUpde\AutoUpde\bin\Debug\AutoUpde.EXE"; string name= System.IO.Path.GetFileName(filePath); string Path = filePath.Substring(0, filePath.LastIndexOf(name)); string a = @"F:\WinForm\AutoUpde\AutoUpde\bin\Debug\AutoUpde.EXE"; string b=a.Remove(a.LastIndexOf(@"\")+1); Console.WriteLine(b); 用什么正则!!这个简单的问题,用substring+lastIndexof就行了 添加form时怎么不添加.resx文件 服务器路径的写法 WinForm下DataGridView编辑状态下删除最后一行问题 如何让一个while循环延迟?????? 问一个存储过程,请教 活做不完了,有人要帮助我吗,给钱 net第一次运行较慢 然后会变快的界定问题 如何用鼠标中键的滚动来控制事件发生 从xml文件解析到dataset,将dataset导入SQL数据库? 各位用过FreeTextBox的帮我解决以下很头疼的问题.马上给分! asp.net的页面用asp时代的方法写 webbroswer控件重加载webBrowser1.DocumentCompleted 问题
string SavePathTemp = Application.ExecutablePath;
string SavePath = Application.ExecutablePath.Substring(0, SavePathTemp.LastIndexOf("\\"));
string name= System.IO.Path.GetFileName(filePath);
string Path = filePath.Substring(0, filePath.LastIndexOf(name));
string name= System.IO.Path.GetFileName(filePath);
string Path = filePath.Substring(0, filePath.LastIndexOf(name));
string b=a.Remove(a.LastIndexOf(@"\")+1);
Console.WriteLine(b);