Bewerken

Share via


Char.ToLower Method

Definition

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

Overloads

ToLower(Char, CultureInfo)

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

ToLower(Char)

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

Examples

The following example demonstrates ToLower.

using namespace System;
using namespace System::Globalization;

// for CultureInfo
void main()
{
   Console::WriteLine( Char::ToLower( 'A' ) ); // Output: "a"
}
using System;
using System.Globalization;

public class ToLowerSample {
    public static void Main() {
        Console.WriteLine(Char.ToLower('A'));				// Output: "a"
    }
}
open System

printfn $"{Char.ToLower 'A'}"  // Output: "a"
Module ToLowerSample

    Sub Main()
        Console.WriteLine(Char.ToLower("A"c))               ' Output: "a"
    End Sub

End Module

ToLower(Char, CultureInfo)

Source:
Char.cs
Source:
Char.cs
Source:
Char.cs

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

public:
 static char ToLower(char c, System::Globalization::CultureInfo ^ culture);
public static char ToLower (char c, System.Globalization.CultureInfo culture);
static member ToLower : char * System.Globalization.CultureInfo -> char
Public Shared Function ToLower (c As Char, culture As CultureInfo) As Char

Parameters

c
Char

The Unicode character to convert.

culture
CultureInfo

An object that supplies culture-specific casing rules.

Returns

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

Exceptions

culture is null.

Remarks

Use String.ToLower to convert a string to lowercase.

See also

Applies to

ToLower(Char)

Source:
Char.cs
Source:
Char.cs
Source:
Char.cs

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

public:
 static char ToLower(char c);
public static char ToLower (char c);
static member ToLower : char -> char
Public Shared Function ToLower (c As Char) As Char

Parameters

c
Char

The Unicode character to convert.

Returns

The lowercase equivalent of c, or the unchanged value of c, if c is already lowercase or not alphabetic.

Remarks

Casing rules are obtained from the current culture.

Use String.ToLower to convert a string to lowercase.

Notes to Callers

As explained in Best Practices for Using Strings, we recommend that you avoid calling character-casing and string-casing methods that substitute default values. Instead, you should call methods that require parameters to be explicitly specified. To convert a character to lowercase by using the casing conventions of the current culture, call the ToLower(Char, CultureInfo) method overload with a value of CurrentCulture for its culture parameter.

See also

Applies to