标签:jpg star ima 扩展 system file 路径 cat get
取文件短名称:
shortname= Path.GetFileNameWithoutExtension(filename); 无扩展名
shortname = filename.Substring(filename.LastIndexOf(‘\\‘) + 1); 有扩展名
取执行文件路径:
string appPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
string filePath = "image\Star.jpg";
组合文件路径
filePath = System.IO.Path.Combine(appPath, filePath);
标签:jpg star ima 扩展 system file 路径 cat get
原文地址:https://www.cnblogs.com/wfy680/p/12047350.html