how to check if a letter is capital in c# code example
Example 1: c# check if string is only letters and numbers
if (textVar.All(c => Char.IsLetterOrDigit(c))) {
// String contains only letters & numbers
}
Example 2: if char is upper csharp
char ch1 = 'G';
bool result = Char.IsUpper(ch1);
Example 3: how to check if a string contains a capital letter c#
using System.Linq;
str.Any(char.IsUpper);