C# Convert ToSByte(Object)
Description
Convert ToSByte(Object)
converts the value of the specified
object to an 8-bit signed integer.
Syntax
Convert.ToSByte(Object)
has the following syntax.
[CLSCompliantAttribute(false)]
public static sbyte ToSByte(
Object value
)
Parameters
Convert.ToSByte(Object)
has the following parameters.
value
- An object that implements the IConvertible interface, or null.
Returns
Convert.ToSByte(Object)
method returns An 8-bit signed integer that is equivalent to value, or zero if value is null.
Example
/* w w w.j a va 2 s . co m*/
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Convert.ToSByte((Object)123));
}
}
The code above generates the following result.