asp.net.ph

Convert.ToChar Method ( String, IFormatProvider )

System Namespace   Convert Class


Converts the first character of a String to a Unicode character using specified culture-specific formatting information.

[ VB ]
Overloads Public Shared Function ToChar ( _
   ByVal value As String, _
   ByVal provider As IFormatProvider _
) As Char

[ C# ]
public static char ToChar (
   string value,
   IFormatProvider provider
);

[ C++ ]
public: static __wchar_t ToChar (
   String* value,
   IFormatProvider* provider
);

[ JScript ]
public static function ToChar (
   value : String,
   provider : IFormatProvider
) : Char;

Parameters

value
A String of length 1 or a null reference ( Nothing in Visual Basic ).
provider
( Reserved ) An IFormatProvider interface implementation that supplies culture-specific formatting information.

Return Value

The Unicode character equivalent to the first and only character in value.

Exceptions


Exception Type Condition
ArgumentNullException value is a null reference ( Nothing in Visual Basic ).
FormatException The length of value is not 1.

Remarks

value must be a null reference ( Nothing in Visual Basic ) or a String containing a single character.

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

See Also

Convert Members   Convert.ToChar Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph