C# Convert ToSingle(Char)
Description
Convert ToSingle(Char)
calling this method always throws
InvalidCastException.
Syntax
Convert.ToSingle(Char)
has the following syntax.
public static float ToSingle(
char value
)
Parameters
Convert.ToSingle(Char)
has the following parameters.
value
- The Unicode character to convert.
Returns
Convert.ToSingle(Char)
method returns This conversion is not supported. No value is returned.
Example
/*from w w w . j a v a 2s. c o m*/
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToSingle('a'));
}
}
The code above generates the following result.