string webPath = folderPath.Replace("\\","/");

use*_*510 2 .net c#

string webPath = folderPath.Replace("\", "/");
Run Code Online (Sandbox Code Playgroud)

嗨,我正试图取代上面的但是很挣扎.我是否需要将转义序列应用于/.如果是这样,任何人都知道它在c#中是什么.任何帮助/提示非常感谢.

sha*_*esh 10

string webPath = folderPath.Replace(@"\", "/");
Run Code Online (Sandbox Code Playgroud)


Ste*_*eve 10

string webPath = folderPath.Replace("\\", "/"); 
Run Code Online (Sandbox Code Playgroud)

......也会奏效.


Mit*_*eat 5

string webPath = folderPath.Replace(@"\", "/");
Run Code Online (Sandbox Code Playgroud)