Export (0) Print
Expand All

Convert.ToSByte Method (Int16)

.NET Framework 1.1

Converts the value of the specified 16-bit signed integer to the equivalent 8-bit signed integer.

This method is not CLS-compliant. For more information about CLS compliance, see What is the Common Language Specification.

[Visual Basic]
<CLSCompliant(False)>
Overloads Public Shared Function ToSByte( _
   ByVal value As Short _
) As SByte
[C#]
[CLSCompliant(false)]
public static sbyte ToSByte(
 short value
);
[C++]
[CLSCompliant(false)]
public: static char ToSByte(
 short value
);
[JScript]
public
   CLSCompliant(false)
static function ToSByte(
 value : Int16
) : SByte;

Parameters

value
A 16-bit signed integer.

Return Value

The 8-bit signed integer equivalent to the value of value.

Exceptions

Exception Type Condition
OverflowException value is greater than SByte.MaxValue or less than SByte.MinValue.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Convert Class | Convert Members | System Namespace | Convert.ToSByte Overload List

Show:
© 2014 Microsoft