当前位置: 代码迷 >> 综合 >> 获取项目当前路径
  详细解决方案

获取项目当前路径

热度:19   发布时间:2023-10-12 00:44:33.0

string path = Application.StartupPath +".txt"

//string path = Application.StartupPath当前项目路径

 FileStream fs = new FileStream(path, FileMode.Truncate, FileAccess.ReadWrite);

//path :文件的路径

f s.Close();

//关闭

  相关解决方案