![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Char.ToUpperInvariant(Char) Method in C#
The Char.ToUpperInvariant() method in C# is used to convert the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture.
Syntax
public static char ToUpperInvariant (char ch);
Above, the parameter ch is the Unicode character to convert.
Let us now see an example to implement the Char.ToUpperInvariant() method −
Example
using System; public class Demo { public static void Main(){ char ch = 'q'; char res = Char.ToUpperInvariant(ch); Console.WriteLine("Value = "+ch); Console.WriteLine("Uppercase Equivalent = "+res); } }
Output
This will produce the following output −
Value = q Uppercase Equivalent = Q
Let us now see another example −
Example
using System; public class Demo { public static void Main(){ char ch = 'r'; char res = Char.ToUpperInvariant(ch); Console.WriteLine("Value = "+ch); Console.WriteLine("Uppercase Equivalent = "+res); } }
Output
This will produce the following output −
Value = r Uppercase Equivalent = R
Advertisements