Answers for "c# string to lowercase"

C#
10

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());
Posted by: Guest on March-02-2020
1

tolowercase in C#'

//In C# the code to make a string become lowercase is the Tolower() method

//E.G heres some code that checks if something is a vowel

Console.Write("Enter a letter");
char input = Console.ReadLine();

switch(input.ToLower())//To.Lower method is used to convert a string to lowercase
  case "a":
  case "i":
  case "e":
  case "o":
  case "u":
Console.WriteLine($"\n{input} is a vowel");
       break;
  default:
   Console.WriteLine($"\n{input} is not a vowel");
       break;
Posted by: Guest on August-26-2021

Code answers related to "c# string to lowercase"

C# Answers by Framework

Browse Popular Code Answers by Language