Char.ToString Method (Char)

July 28, 2014

Converts the specified Unicode character to its equivalent string representation.

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

'Declaration
Public Shared Function ToString ( _
	c As Char _
) As String

Parameters

c
Type: System.Char
A Unicode character.

Return Value

Type: System.String
The string representation of the value of c.

The following example demonstrates ToString.



Module Example

   Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)

      Dim ch As Char
      ch = "a"c
      outputBlock.Text &= ch.ToString() & vbCrLf        ' Output: "a"

      outputBlock.Text &= Char.ToString("b"c) & vbCrLf  ' Output: "b"

   End Sub

End Module


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft