Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
ToUpper() in C# - CodeGK
Δ Cs Examples
Arrays
Declaring an Array in C#
Initializing an Array in C#
Char
Char in C#
Finding ascii value of Char in C#
Strings
Strings in C#
String Concatenation in C#
String Length in C#
ToLower() in C#
ToUpper() in C#
Interpolation of Strings in C#
IndexOf() in C#
Substring in C#
Int
Int in C#
Int Operations in C#
Switch
Switch in C#
Booleans
Booleans in C#
Operations on Booleans in C#
If_else
If in C#
Else in C#
Else-If in C#
Float
float in C#
float operations in C#
Comments
Single-Line comments in C#
Multi-Line comments in C#
Double
Double in C#
Operations on Double in C#
Long
Long in C#
Operations on Long in C#
Variables
Global Variable in C#
Local Variable in C#
♦ ToUpper() in C#
♣ Example5: ToUpper() in C#
ToUpper() method converts all characters in string to upper case.
In this example, ToUpper() is illustrated.
Example
Input:
Run CODE
Reload Code
Copy Code
using System; namespace Strings { class Program { static void Main(string[] args) { string s1="spaceX"; string s2="Ratchet"; string s3=s1.ToUpper(); Console.WriteLine(s3); string s4=s2.ToUpper(); Console.WriteLine(s4); } } }
Output:
Strings
ToUpper() in C#