A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.char.parse below:

Char.Parse(String) Method (System) | Microsoft Learn

Char.Parse(String) Method Definition

Converts the value of the specified string to its equivalent Unicode character.

public:
 static char Parse(System::String ^ s);
public static char Parse(string s);
static member Parse : string -> char
Public Shared Function Parse (s As String) As Char
Parameters
s
String

A string that contains a single character, or null.

Returns

A Unicode character equivalent to the sole character in s.

Exceptions

The length of s is not 1.

Examples

The following code example demonstrates Parse.

using System;

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

Char.Parse "A"
|> printfn "%c" // Output: 'A'
Module ParseSample

    Sub Main()

        Console.WriteLine(Char.Parse("A")) ' Output: 'A'

    End Sub

End Module
See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4