C# Convert ToInt32(Char)
Description
Convert ToInt32(Char)
converts the value of the specified
Unicode character to the equivalent 32-bit signed integer.
Syntax
Convert.ToInt32(Char)
has the following syntax.
public static int ToInt32(
char value
)
Parameters
Convert.ToInt32(Char)
has the following parameters.
value
- The Unicode character to convert.
Returns
Convert.ToInt32(Char)
method returns A 32-bit signed integer that is equivalent to value.
Example
/* w ww . java2 s.c om*/
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToInt32('a'));
}
}
The code above generates the following result.