Answers for "tolowercase in C#'"

C#
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

C# Answers by Framework

Browse Popular Code Answers by Language