devxlogo

Quickly escape the escape characters in a string.

Quickly escape the escape characters in a string.

C# provides you a way to escape the problematic characters in a string through the ???@??? symbol. Just place it before the string, and the compiler will escape those characters.For e.g. 
String filePath = @???c:windowssystem32???;
Thus you do not have to escape the slashes in the string in the above example.

devx-admin

Share the Post: