System::BitConverter::GetBytes 方法

BitConverter::GetBytes(bool) method

将指定的布尔值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(bool value)
ParameterType描述
valuebool要转换的布尔值

ReturnValue

表示指定值的 1 字节数组

另见

BitConverter::GetBytes(char_t) method

将指定的 char_t 值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(char_t value)
ParameterType描述
valuechar_t要转换的 char_t 值

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(double) method

将指定的双精度浮点值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(double value)
ParameterType描述
valuedouble要转换的浮点值

ReturnValue

表示指定值的 8 字节数组

另见

BitConverter::GetBytes(float) method

将指定的单精度浮点值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(float value)
ParameterType描述
value单精度浮点数要转换的浮点值

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(int) method

将指定的 32 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int value)
ParameterType描述
valueint要转换的 32 位整数值

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(int16_t) method

将指定的 16 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int16_t value)
ParameterType描述
valueint16_t要转换的 16 位整数值

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(int64_t) method

将指定的 64 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(int64_t value)
ParameterType描述
valueint64_t要转换的 64 位整数值

ReturnValue

表示指定值的 8 字节数组

另见

BitConverter::GetBytes(uint16_t) method

将指定的无符号 16 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint16_t value)
ParameterType描述
valueuint16_t要转换的无符号 16 位整数值

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(uint32_t) method

将指定的无符号 32 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint32_t value)
ParameterType描述
valueuint32_t要转换的无符号 32 位整数值

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(uint64_t) method

将指定的无符号 64 位整数值转换为字节数组。

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(uint64_t value)
ParameterType描述
valueuint64_t要转换的无符号 64 位整数值

ReturnValue

表示指定值的 8 字节数组

另见