Char.ToString Method

July 28, 2014

Converts the value of this instance to its equivalent string representation.

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

public override string ToString()

Return Value

Type: System.String
The string representation of the value of this instance.

The following example demonstrates ToString.


using System;

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      char ch = 'a';
      outputBlock.Text += ch.ToString() + "\n";		// Output: "a"

      outputBlock.Text += Char.ToString('b') + "\n";	// Output: "b"
   }
}


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft