How to convert a string to uppercase characters in C# – Programming Code Examples
C# C# Console Application

How to convert a string to uppercase characters in C#1 min read

String ToUpper() Method
String represents text as a series of Unicode characters. String class ToUpper() method return a copy of string converted to uppercase. this method is overloaded, those are ToUpper() and ToUpper(CultureInfo).

string ToUpper() method is in System namespace and its return value type is string. that return ‘string’ is uppercase characters equivalent of the specified string. this ToUpper() method uses the casing rules of the current culture to convert each character to uppercase equivalent. the ToUpper() method does not modify the specified string instance, it just return a new string instance which all characters are converted to uppercase from specified string.

the string ToUpper(CultureInfo) method return a copy of the specified string converted to uppercase, using the casing rules of the specified culture.




the following .net c# example code demonstrate us how can we convert a string to uppercase characters in an asp.net application.

C# Code:

 

Output:

 

Leave a Comment