Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I have a small doubt , in my page i have a string datatype value . whatever i pass the string value that should be converted into capital letter .How to do this

for ex:

string x="Null";
string x="nUll";
string x="NUll";
string x="NULL";
.........
.........

these are my sample values , whatever i pass i want to be convert that value into capital letters only how to do this.

final result:

NULL

can anyone help me...

Thanks in Advance....
Posted

Use string.ToUpper() function to do it.

:)
 
Share this answer
 
use ToUpperInvariant method like,

C#
x.ToUpperInvariant();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900