c to lowercase char code example

Example 1: c# string to lowercase

string author = "Mahesh Chand";  
string bio = "Mahesh Chand is a founder of C# Corner.";  
  
// Covert everything to uppercase  
string ucaseAuthor = author.ToUpper();          
Console.WriteLine($"Uppercase: {ucaseAuthor}");  
  
// Covert everything to lowercase  
string lcaseAuthor = author.ToLower();  
Console.WriteLine($"Lowercase: {lcaseAuthor}");  
  
// We can direct convert to uppercase or lowercase  
Console.WriteLine(bio.ToLower());  
Console.WriteLine(bio.ToUpper());

Example 2: how to change char to string

from character to string: 
	char c = 'a';
	String s = Character.toString(c);
	//s == "a"

Tags:

Cpp Example