Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to convert Lower case to Upper Case using C#?
To convert Lower case to Upper case, use the ToUpper() method in C#.
Let’s say your string is −
str = "david";
To convert the above lowercase string in uppercase, use the ToUpper() method −
Console.WriteLine("Converted to UpperCase : {0}", str.ToUpper());
The following is the code in C# to convert character case −
Example
using System;
using System.Collections.Generic;
using System.Text;
namespace Demo {
class MyApplication {
static void Main(string[] args) {
string str;
str = "david";
Console.WriteLine("LowerCase : {0}", str);
// convert to uppercase
Console.WriteLine("Converted to UpperCase : {0}", str.ToUpper());
Console.ReadLine();
}
}
} Advertisements
