C# Convert ToSByte(Byte)
Description
Convert ToSByte(Byte)
converts the value of the specified
8-bit unsigned integer to the equivalent 8-bit signed integer.
Syntax
Convert.ToSByte(Byte)
has the following syntax.
[CLSCompliantAttribute(false)]
public static sbyte ToSByte(
byte value
)
Parameters
Convert.ToSByte(Byte)
has the following parameters.
value
- The 8-bit unsigned integer to convert.
Returns
Convert.ToSByte(Byte)
method returns An 8-bit signed integer that is equivalent to value.
Example
//www . ja va2s . co m
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToSByte((Byte)12));
}
}
The code above generates the following result.