获取文件的绝对路径

  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
 
阅读更多 登录后自动展开
想对作者说点什么? 我来说一句

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