
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to Convert Character Case
Let’s say your string is −
str = "AMIT";
To convert the above uppercase string in lowercase, use the ToLower() method −
Console.WriteLine("Converted to LowerCase : {0}", str.ToLower());
Example
The following is the code in C# to convert character case.
using System; using System.Collections.Generic; using System.Text; namespace Demo { class MyApplication { static void Main(string[] args) { string str; str = "AMIT"; Console.WriteLine("UpperCase : {0}", str); // convert to lowercase Console.WriteLine("Converted to LowerCase : {0}", str.ToLower()); Console.ReadLine(); } } }
Output
UpperCase : AMIT Converted to LowerCase : amit
Advertisements