Is there an alternative to using a regular expression to detect if a string contains uppercase characters? Currently I\'m using the following regular expression:
<
Using LINQ might have an impact on performance when using a large string . You can also use ASCII level comparison.
byte[] asciiBytes = Encoding.ASCII.GetBytes(fullUri); for (int i = 0; i < asciiBytes.Length; i++) { if (asciiBytes[i] > 64 && asciiBytes[i] < 91) { return true; } }