GetBytes()

BitConverter::GetBytes(bool) method

Converts the specified boolean value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(bool value)

Arguments

ParameterTypeDescription
valueboolA boolean value to convert

Return Value

1-byte array representing specified value

BitConverter::GetBytes(char_t) method

Converts the specified char_t value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(char_t value)

Arguments

ParameterTypeDescription
valuechar_tA char_t value to convert

Return Value

2-byte array representing specified value

BitConverter::GetBytes(int16_t) method

Converts the specified 16-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int16_t value)

Arguments

ParameterTypeDescription
valueint16_tA 16-bit integer value to convert

Return Value

2-byte array representing specified value

BitConverter::GetBytes(int) method

Converts the specified 32-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int value)

Arguments

ParameterTypeDescription
valueintA 32-bit integer value to convert

Return Value

4-byte array representing specified value

BitConverter::GetBytes(int64_t) method

Converts the specified 64-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int64_t value)

Arguments

ParameterTypeDescription
valueint64_tA 64-bit integer value to convert

Return Value

8-byte array representing specified value

BitConverter::GetBytes(uint16_t) method

Converts the specified unsigned 16-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint16_t value)

Arguments

ParameterTypeDescription
valueuint16_tAn unsigned 16-bit integer value to convert

Return Value

2-byte array representing specified value

BitConverter::GetBytes(uint32_t) method

Converts the specified unsigned 32-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint32_t value)

Arguments

ParameterTypeDescription
valueuint32_tAn unsigned 32-bit integer value to convert

Return Value

4-byte array representing specified value

BitConverter::GetBytes(uint64_t) method

Converts the specified unsigned 64-bit integer value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint64_t value)

Arguments

ParameterTypeDescription
valueuint64_tAn unsigned 64-bit integer value to convert

Return Value

8-byte array representing specified value

BitConverter::GetBytes(float) method

Converts the specified single-precision floating-point value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(float value)

Arguments

ParameterTypeDescription
valuefloatA floating-point value to convert

Return Value

4-byte array representing specified value

BitConverter::GetBytes(double) method

Converts the specified double-precision floating-point value into an array of bytes.

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(double value)

Arguments

ParameterTypeDescription
valuedoubleA floating-point value to convert

Return Value

8-byte array representing specified value

See Also