System.Xml.XmlConvert.ToChar Method

Converts the string to a char equivalent.

Syntax

public static char ToChar (string s)

Parameters

s
The string containing a single character to convert.

Returns

A Char representing the single character.

Exceptions

TypeReason
ArgumentNullException s is a null reference.
FormatException s contains more than one character.

Remarks

This method calls char.Parse(string)(s).

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0