How to check if a character is upper case in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            char ch = 'A';

            if (char.IsUpper(ch))
                Console.WriteLine("yes");
            else
                Console.WriteLine("no");
        }
    }
}


/*
run:
 
yes

*/

 



answered Dec 30, 2016 by avibootz

Related questions

...