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