Share via


Char.ToUpper Method (Char)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Converts the value of a Unicode character to its uppercase equivalent.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function ToUpper ( _
    c As Char _
) As Char
public static char ToUpper(
    char c
)

Parameters

Return Value

Type: System.Char
The uppercase equivalent of c, or the unchanged value of c if c is already uppercase, has no uppercase equivalent, or is not alphabetic.

Remarks

Casing rules are obtained from the current culture.

Use String.ToUpper to convert a Char to uppercase.

Notes to Callers

Starting in Silverlight 4, the behavior of the Char.ToUpper(Char) method has changed. In Silverlight 4, it converts c to uppercase using the casing rules of the current culture. This conforms to the behavior of the Char.ToUpper(Char) method in the full .NET Framework. In Silverlight 2 and Silverlight 3, Char.ToUpper(Char) uses the casing rules of the invariant culture. If the common language runtime determines that a Silverlight-based application was compiled against Silverlight 2 or Silverlight 3, it performs an ordinal comparison; otherwise, it performs a culture-sensitive comparison.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.