 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to define character constants in C#?
Character literals are enclosed in single quotes. For example, 'x' and can be stored in a simple variable of char type. A character literal can be a plain character (such as 'x'), an escape sequence (such as '\t'), or a universal character (such as '\u02C0').
Let us see an example how to define a character constant in C# −
using System; namespace Demo {    class Program {       static void Main(string[] args) {          Console.WriteLine("Welcome!\t
");          Console.WriteLine("This is it!");          Console.ReadLine();       }    } } Above, we have used the 
 and \t constants that are new-line and horizontal tab constants −
Console.WriteLine("Welcome!\t
"); Console.WriteLine("This is it!");Advertisements
 