Error Message
C# Escape is easy to use tool to escape plain C# to escaped CSharp which helps to show CSharp text in C# in <pre> tag. Copy, Paste and Escape.
What can you do with C# Escape?
- C# Escape is 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.
- C# Escaper Online works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.
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 }