C# get away is a simple-to-use tool to get away from plain C# to escape CSharp which facilitates to show of CSharp textual content in C# in <pre> tag. Replica, Paste, and escape.
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(); } } }
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 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.
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 }
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(); } } }
There are several online tools that allow you to escape and unescape C# strings. Here are some options:
Online JavaScript Escape/Unescape: This tool allows you to escape and unescape C# strings by selecting the "C# (CSharp)" option from the dropdown menu. Simply paste your string into the input box and click the "Escape" or "Unescape" button to convert it.
C# String Escaper/Unescaper: This tool allows you to escape and unescape C# strings by pasting your string into the input box and clicking the "Escape" or "Unescape" button. It supports a wide range of escape sequences, including Unicode escape sequences and hexadecimal escape sequences.
Free Formatter C# Escape Tool: This tool allows you to escape C# strings by pasting your string into the input box and clicking the "Escape" button. It supports a wide range of escape sequences, including Unicode escape sequences and hexadecimal escape sequences.
Note that these tools may have slightly different behavior when it comes to escaping and unescaping certain characters or sequences, so you may need to experiment with different tools or configurations to find the one that works best for your needs.