Click or drag to resize
ConvertToChar Method (Object)
Converts the value of the specified object to a Unicode character.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static char ToChar(
	Object value
)

Parameters

value
Type: SystemObject
An object that implements the IConvertible interface.

Return Value

Type: Char
A Unicode character that is equivalent to value, or MinValue if value is null.
Exceptions
ExceptionCondition
ArgumentNullExceptionvalue is a null string.
InvalidCastExceptionvalue does not implement the IConvertible interface.-or-The conversion of value to a Char is not supported.
OverflowExceptionvalue is less than MinValue or greater than MaxValue.
See Also