How to

escape string

Published: 24. October 2011 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » Strings
Tags: C# Text
Was this snippet helpful for you? YESYES / NONO
string escaped = @"C:\Test";
Console.WriteLine(escaped);

// escape double quote
string escapedWithQuotationMark = @"this ""is"" it";
Console.WriteLine(escapedWithQuotationMark);
Console Output:
C:\Test
this "is" it
Send us feedback about this snippet »



Related Snippets: