Answers for "escape characters in c#?"

C#
4

c# escape characters

\' – single quote, needed for character literals
\" – double quote, needed for string literals
\\ – backslash
\0 – Unicode character 0
\a – Alert (character 7)
\b – Backspace (character 8)
\f – Form feed (character 12)
\n – New line (character 10)
\r – Carriage return (character 13)
\t – Horizontal tab (character 9)
\v – Vertical quote (character 11)
Posted by: Guest on March-06-2020
0

escape in c#

string testString = "VGVzdDEgLSA6Ojo7OzsnJ34hQCMkJV4mKigpXytgLT1bXXt9Iid8XDw+LC4/Ly50eHQ=";
		testString = "Test1 - :::;;;''~!@#$%^&*()_+`-=[]{}\"'|\\<>,.?/.txt"; // Test1 - :::;;;''~!@#$%^&*()_+`-=[]{}"'|\<>,.?/.txt
		Console.WriteLine("UrlEncode: " + System.Web.HttpUtility.UrlEncode(testString));
		Console.WriteLine("EscapeUriString: " + Uri.EscapeUriString(testString));
		Console.WriteLine("EscapeDataString: " + Uri.EscapeDataString(testString));
		Console.WriteLine("EscapeDataReplace: " + Uri.EscapeDataString(testString).Replace("%20", "+"));	
		Console.WriteLine("HtmlEncode: " + System.Web.HttpUtility.HtmlEncode(testString));
		Console.WriteLine("UrlPathEncode: " + System.Web.HttpUtility.UrlPathEncode(testString));
https://dotnetfiddle.net/oLFyZq
Posted by: Guest on August-15-2021

C# Answers by Framework

Browse Popular Code Answers by Language