Sdílet prostřednictvím


Char.ToLower Method (Char, CultureInfo)

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

Converts the value of a specified Unicode character to its lowercase equivalent using specified culture-specific formatting information.

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

Syntax

'Declaration
Public Shared Function ToLower ( _
    c As Char, _
    culture As CultureInfo _
) As Char
public static char ToLower(
    char c,
    CultureInfo culture
)

Parameters

Return Value

Type: System.Char
The lowercase equivalent of c, modified according to culture, or the unchanged value of c, if c is already lowercase or not alphabetic.

Exceptions

Exception Condition
ArgumentNullException

culture is nulla null reference (Nothing in Visual Basic).

Remarks

Use String.ToLower to convert a string to lowercase.

Notes to Callers

On Mac OS X v 10.4 and earlier versions, converting a Char to lowercase by specifying a culture other than the current culture is not supported.

Examples

The following example demonstrates ToLower.


Module Example

   Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      outputBlock.Text &= Char.ToLower("A"c) & vbCrLf               ' Output: "a"
   End Sub

End Module
using System;
using System.Globalization;  // for CultureInfo

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      outputBlock.Text += Char.ToLower('A') + "\n";             // Output: "a"
   }
}

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.