C# String ToUpperInvariant

Description

String ToUpperInvariant returns a copy of this String object converted to uppercase using the casing rules of the invariant culture.

Syntax

String.ToUpperInvariant has the following syntax.


public string ToUpperInvariant()

Returns

String.ToUpperInvariant method returns The uppercase equivalent of the current string.

Example

The following example shows how to use ToUpperInvariant method.


/*from   w  w  w.j  a v  a  2s  . c o m*/
using System;
using System.IO;

public class Example
{
   public static void Main()
   {
      string words = "Tuesday";
      Console.WriteLine(words.ToUpperInvariant());
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version