Export (0) Print
Expand All

BitConverter.GetBytes Method

Converts the specified data to an array of bytes.

Overload List

Returns the specified Boolean value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Boolean) As Byte()
[C#] public static byte[] GetBytes(bool);
[C++] public: static unsigned char GetBytes(bool) __gc[];
[JScript] public static function GetBytes(Boolean) : Byte[];

Returns the specified Unicode character value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Char) As Byte()
[C#] public static byte[] GetBytes(char);
[C++] public: static unsigned char GetBytes(__wchar_t) __gc[];
[JScript] public static function GetBytes(Char) : Byte[];

Returns the specified double-precision floating point value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Double) As Byte()
[C#] public static byte[] GetBytes(double);
[C++] public: static unsigned char GetBytes(double) __gc[];
[JScript] public static function GetBytes(double) : Byte[];

Returns the specified 16-bit signed integer value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Short) As Byte()
[C#] public static byte[] GetBytes(short);
[C++] public: static unsigned char GetBytes(short) __gc[];
[JScript] public static function GetBytes(Int16) : Byte[];

Returns the specified 32-bit signed integer value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Integer) As Byte()
[C#] public static byte[] GetBytes(int);
[C++] public: static unsigned char GetBytes(int) __gc[];
[JScript] public static function GetBytes(int) : Byte[];

Returns the specified 64-bit signed integer value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Long) As Byte()
[C#] public static byte[] GetBytes(long);
[C++] public: static unsigned char GetBytes(__int64) __gc[];
[JScript] public static function GetBytes(long) : Byte[];

Returns the specified single-precision floating point value as an array of bytes.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(Single) As Byte()
[C#] public static byte[] GetBytes(float);
[C++] public: static unsigned char GetBytes(float) __gc[];
[JScript] public static function GetBytes(float) : Byte[];

Returns the specified 16-bit unsigned integer value as an array of bytes. This method is not CLS-compliant.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(UInt16) As Byte()
[C#] public static byte[] GetBytes(ushort);
[C++] public: static unsigned char GetBytes(unsigned short) __gc[];
[JScript] public static function GetBytes(UInt16) : Byte[];

Returns the specified 32-bit unsigned integer value as an array of bytes. This method is not CLS-compliant.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(UInt32) As Byte()
[C#] public static byte[] GetBytes(uint);
[C++] public: static unsigned char GetBytes(unsigned int) __gc[];
[JScript] public static function GetBytes(UInt32) : Byte[];

Returns the specified 64-bit unsigned integer value as an array of bytes. This method is not CLS-compliant.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Shared Function GetBytes(UInt64) As Byte()
[C#] public static byte[] GetBytes(ulong);
[C++] public: static unsigned char GetBytes(unsigned __int64) __gc[];
[JScript] public static function GetBytes(UInt64) : Byte[];

See Also

BitConverter Class | BitConverter Members | System Namespace

Show:
© 2014 Microsoft