This documentation is archived and is not being maintained.

SByteConverter Class

Provides a type converter to convert 8-bit unsigned integer objects to and from a string.

For a list of all members of this type, see SByteConverter Members.


[Visual Basic]
Public Class SByteConverter
   Inherits BaseNumberConverter
public class SByteConverter : BaseNumberConverter
public __gc class SByteConverter : public BaseNumberConverter
public class SByteConverter extends BaseNumberConverter

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


This converter can convert only an 8-bit unsigned integer object to and from a string.

The SByte value type represents integers with values ranging from negative 128 to positive 127. This data type is not supported in Visual Basic.

Note   You should never create an instance of SByteConverter. Instead, call the GetConverter method of TypeDescriptor. For more information, see the examples in the TypeConverter base class and Implementing a Type Converter.


[Visual Basic, C#, C++] The following sample converts a variable of type SByte to a string, and vice versa.

[Visual Basic] 
'This data type is not supported in Visual Basic.

sbyte mySByte=+121;
string mySByteStr="-100";
Console.WriteLine(TypeDescriptor.GetConverter(mySByte).ConvertTo(mySByte, typeof(string))); 

SByte mySByte( +121 );
String* mySByteStr = S"-100";
Console::WriteLine(TypeDescriptor::GetConverter(__box(mySByte))->ConvertTo(__box(mySByte), __typeof(String)));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.ComponentModel

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

SByteConverter Members | System.ComponentModel Namespace