c# check for a capital letter in a string code example
Example 1: if char is upper csharp
char ch1 = 'G';
bool result = Char.IsUpper(ch1);
Example 2: how to check if a string contains a capital letter c#
using System.Linq;
str.Any(char.IsUpper);