C# Char ToString(IFormatProvider)

Description

Char ToString(IFormatProvider) converts the value of this instance to its equivalent string representation using the specified culture-specific format information.

Syntax

Char.ToString(IFormatProvider) has the following syntax.


public string ToString(
  IFormatProvider provider
)

Parameters

Char.ToString(IFormatProvider) has the following parameters.

  • provider - (Reserved) An object that supplies culture-specific formatting information.

Returns

Char.ToString(IFormatProvider) method returns The string representation of the value of this instance as specified by provider.

Example

The following code example demonstrates an overload of ToString.


//from w  ww.  j a va2 s .  com
using System;

public class ToStringSample {
  public static void Main() {
    Console.WriteLine(Char.ToString('b'));  // Output: "b"
  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version