50%

C# Escape / Unescape


Enter the String

Size : 0 , 0 Characters

The Result String:

Size : 0 , 0 Characters

CSharp Escape/Unescape



This is an easy-to-use online tool for developers and programmers to escape or unescape CSharp codes which implies removing traces of offending characters that could prevent compiling. The tool was created to help with escaping special unicode characters into a quoted string literal value for C# source code and also unescape it. It has a simple interface which is easy to understand and navigate to get the desired results.


What Characters are Replaced?



The following characters are reserved in C#/CSharp and must be properly escaped to be used in strings: Backspace is replaced with \b Newline is replaced with \n Tab is replaced with \t Carriage return is replaced with \r Form feed is replaced with \f Single quote is replaced with \ Double quote is replaced with \ Backslash is replaced with \\ What Can Be Done with C#/CSharp Escape? C# Escape is a very unique tool to escape plain CSharp. This tool saves your time and helps to escape Csharp data. This tool allows loading the Plain C# data URL which loads plain data to escape. Click on the URL button Enter URL and Submit. Users can also convert plain C# File to escaped C# by uploading the file.


What Can Be Done with C#/CSharp Unescape?



C# Unescape is a very unique tool to unescape CSharp. This tool saves your time and helps to unescape Csharp data. This tool allows loading the Plain C# data URL which loads plain data to unescape. Click on the URL button Enter URL and Submit. Users can also convert plain C# File to unescaped C# by uploading the file.


How Do I Use the CSharp Escape & Unescape Online Tool?



Enter your String in the left-sided box Click on Escape/Unescape depending on what you want to do Wait for your result to be displayed in the right-sided box Copy to your clipboard and use as you want.


Example

C# Try it.

using System;
namespace Example1 {
    class Program {
   		public static void value(int num) {
   			num++;
   		}
   		public static void reference(ref int num) {
   			num++;
   		}
   		static void Main(string[] args) {
   			int num;
   			Console.Write("Enter a number:	");
   			num = Convert.ToInt32(Console.ReadLine());
   			Console.WriteLine("Value Type");
   			Console.WriteLine("----------------");
   			Console.Write("Previous Value:	{0}", num);
   			Program.value(num);
   			Console.Write("Current Value:	{0}", num);
   			Console.WriteLine("----------------");
   			Console.WriteLine("	Reference Type");
   			Console.WriteLine("--------------------");
   			Console.Write("Previous Value:	{0}", num);
   			Program.reference(ref num);
   			Console.Write("Current Value:	{0}", num);
   			Console.ReadLine();
   		}
   	}
  }

Escaped C#

using System;\nnamespace Example1 {\n    class Program {\n   \t\tpublic static void value(int num) {\n   \t\t\tnum++;\n   \t\t}\n   \t\tpublic static void reference(ref int num) {\n   \t\t\tnum++;\n   \t\t}\n   \t\tstatic void Main(string[] args) {\n   \t\t\tint num;\n   \t\t\tConsole.Write(\"Enter a number:\t\");\n   \t\t\tnum = Convert.ToInt32(Console.ReadLine());\n   \t\t\tConsole.WriteLine(\"Value Type\");\n   \t\t\tConsole.WriteLine(\"----------------\");\n   \t\t\tConsole.Write(\"Previous Value:\t{0}\", num);\n   \t\t\tProgram.value(num);\n   \t\t\tConsole.Write(\"Current Value:\t{0}\", num);\n   \t\t\tConsole.WriteLine(\"----------------\");\n   \t\t\tConsole.WriteLine(\"\tReference Type\");\n   \t\t\tConsole.WriteLine(\"--------------------\");\n   \t\t\tConsole.Write(\"Previous Value:\t{0}\", num);\n   \t\t\tProgram.reference(ref num);\n   \t\t\tConsole.Write(\"Current Value:\t{0}\", num);\n   \t\t\tConsole.ReadLine();\n   \t\t}\n   \t}\n  }

C# Unescape


C# Unescape is easy to use tool to unescape C# and converts to plain C# to unescaped CSharp which helps to show CSharp text in C# in <pre> tag. Copy, Paste and Unescape.

What can you do with C# Unescape?

  • C# Unescape is very unique tool to unescape CSharp.
  • This tool saves your time and helps to unescape Csharp data.
  • This tool allows loading the Plain C# data URL, which loads plain data to unescape. Click on the URL button, Enter URL and Submit.
  • Users can also convert plain C# File to unescaped C# by uploading the file.
  • C# Unescape Online works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.

Example

Escaped C# Try it.

using System;\nnamespace Example1 {\n    class Program {\n   \t\tpublic static void value(int num) {\n   \t\t\tnum++;\n   \t\t}\n   \t\tpublic static void reference(ref int num) {\n   \t\t\tnum++;\n   \t\t}\n   \t\tstatic void Main(string[] args) {\n   \t\t\tint num;\n   \t\t\tConsole.Write(\"Enter a number:\t\");\n   \t\t\tnum = Convert.ToInt32(Console.ReadLine());\n   \t\t\tConsole.WriteLine(\"Value Type\");\n   \t\t\tConsole.WriteLine(\"----------------\");\n   \t\t\tConsole.Write(\"Previous Value:\t{0}\", num);\n   \t\t\tProgram.value(num);\n   \t\t\tConsole.Write(\"Current Value:\t{0}\", num);\n   \t\t\tConsole.WriteLine(\"----------------\");\n   \t\t\tConsole.WriteLine(\"\tReference Type\");\n   \t\t\tConsole.WriteLine(\"--------------------\");\n   \t\t\tConsole.Write(\"Previous Value:\t{0}\", num);\n   \t\t\tProgram.reference(ref num);\n   \t\t\tConsole.Write(\"Current Value:\t{0}\", num);\n   \t\t\tConsole.ReadLine();\n   \t\t}\n   \t}\n  }

Unescaped C#

using System;
namespace Example1 {
    class Program {
   		public static void value(int num) {
   			num++;
   		}
   		public static void reference(ref int num) {
   			num++;
   		}
   		static void Main(string[] args) {
   			int num;
   			Console.Write("Enter a number:	");
   			num = Convert.ToInt32(Console.ReadLine());
   			Console.WriteLine("Value Type");
   			Console.WriteLine("----------------");
   			Console.Write("Previous Value:	{0}", num);
   			Program.value(num);
   			Console.Write("Current Value:	{0}", num);
   			Console.WriteLine("----------------");
   			Console.WriteLine("	Reference Type");
   			Console.WriteLine("--------------------");
   			Console.Write("Previous Value:	{0}", num);
   			Program.reference(ref num);
   			Console.Write("Current Value:	{0}", num);
   			Console.ReadLine();
   		}
   	}
  }

For Advanced Users

External URL

Load External URL in Browser URL like this https://www.fancytextconverter.com/csharp-escape-unescape?url=external-url

https://www.fancytextconverter.com/csharp-escape-unescape#url=https://gist.githubusercontent.com/cbmgit/e0386a4b645bf07dc6e65053de13d29e/raw/HelloWorld.cs

Related Tools


Recently visited pages


Tags