ToString Method (IFormatProvider)
Collapse the table of content
Expand the table of content

Char.ToString Method (IFormatProvider)

 

Converts the value of this instance to its equivalent string representation using the specified culture-specific format information.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public string ToString(
	IFormatProvider provider
)

Parameters

provider
Type: System.IFormatProvider

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

Return Value

Type: System.String

The string representation of the value of this instance as specified by provider.

The provider parameter is ignored; it does not participate in this operation.

The following code example demonstrates an overload of ToString.

using System;

public class ToStringSample {
	public static void Main() {
		char ch = 'a';
		Console.WriteLine(ch.ToString());		// Output: "a"

		Console.WriteLine(Char.ToString('b'));	// Output: "b"
	}
}

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft