Lower case to upper case | C # program to convert a string to uppercase ; Converts a string to uppercase ; Driver code
using System ; class GFG { static String to_upper ( char [ ] In ) { for ( int i = 0 ; i < In . Length ; i ++ ) { if ( ' a ' <= In [ i ] & In [ i ] <= ' z ' ) { In [ i ] = ( char ) ( In [ i ] - ' a ' + ' A ' ) ; } } return String . Join ( " " , In ) ; } public static void Main ( ) { String str = " geeksforgeeks " ; Console . WriteLine ( to_upper ( str . ToCharArray ( ) ) ) ; } }