C# Char ToString(Char)
Description
Char ToString(Char)
converts the specified Unicode
character to its equivalent string representation.
Syntax
Char.ToString(Char)
has the following syntax.
public static string ToString(
char c
)
Parameters
Char.ToString(Char)
has the following parameters.
c
- The Unicode character to convert.
Returns
Char.ToString(Char)
method returns The string representation of the value of c.
Example
The following code example demonstrates ToString.
/* ww w . ja v a2 s . co m*/
using System;
public class ToStringSample {
public static void Main() {
Console.WriteLine(Char.ToString('b')); // Output: "b"
}
}
The code above generates the following result.