获取文件的绝对路径

  public string GetFullPath(string filename,string foldername)
  {   
   string path = Path.GetFullPath(filename);
   string fullpath = path.Replace(@"/bin/Debug/"+filename,foldername+filename);
   return fullpath;
  }
调用:filename = CodeTableManager.mdb
      foldername = @"/db/"
返回值:E:/NIPCGR/CodeTableManager/db/CodeTableManager.mdb
 
阅读更多
换一批

没有更多推荐了,返回首页