C# code to print a backslash:
// C# program to print backslash (\)
using System;
using System.IO;
using System.Text;
namespace JustTechReview
{
class Test
{
// Main Method
static void Main(string[] args)
{
// printing "\"
Console.WriteLine("\\");
// printing between string "\"
Console.WriteLine("Hello\\World");
// printing "\"n and "\"t
Console.WriteLine("\\n\\t");
//hit ENTER to exit the program
Console.ReadLine();
}
}
}
Output:
\
Hello\World
\n\t