how to detect a capital letter c# 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);
char ch1 = 'G';
bool result = Char.IsUpper(ch1);
using System.Linq;
str.Any(char.IsUpper);