Char.ToLower Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts the value of a Unicode character to its lowercase equivalent.
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. |
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
- 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
- ToLower(Rune, CultureInfo)
- ToUpper(Rune, CultureInfo)
- CurrentCulture
- ToLower()
- ToUpper(Char, CultureInfo)
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 |
- 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
.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 |