Removing from URI Relative Path

前端 未结 4 590
一生所求
一生所求 2021-01-03 20:09

I am generating a relative path from 1 directory to another. If the OutputDirectoryName property is a directory containing spaces, the spaces are encoded using %20, rather t

4条回答
  •  情书的邮戳
    2021-01-03 21:05

    string sRelativeFilePath = Uri.UnescapeDataString(new Uri(sAbsolutePath + "\\", false).MakeRelative(new Uri(filename)));
    

提交回复
热议问题