Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
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 15-Jan-13 21:24pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use string.ToUpper() function to do it.

Smile | :)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

use ToUpperInvariant method like,

x.ToUpperInvariant();
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 6,474
1 OriginalGriff 6,258
2 Peter Leow 2,534
3 Abhinav S 2,274
4 Maciej Los 2,268


Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100