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 System;
using System.Globalization;

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

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);

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

.NET 9 и другие версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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);

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

.NET 9 и другие версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1
UWP 10.0