Array for keeping track of both uppercase and lowercase english alphabets
bool [ ] uppercase = new bool [ 26 ] ; bool [ ] lowercase = new bool [ 26 ] ; char [ ] arr = str . ToCharArray ( ) ; foreach ( char c in arr ) { if ( char . IsLower ( c ) ) lowercase = true ; if ( char . IsUpper ( c ) ) uppercase = true ; }