System::BitConverter::GetBytes 方法

BitConverter::GetBytes(bool) method

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

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(bool value)
参数类型描述
bool要转换的布尔值

ReturnValue

表示指定值的 1 字节数组

另见

BitConverter::GetBytes(char_t) method

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

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(char_t value)
参数类型描述
char_t要转换的 char_t 值

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(double) method

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

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(double value)
参数类型描述
double要转换的浮点值

ReturnValue

表示指定值的 8 字节数组

另见

BitConverter::GetBytes(float) method

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

static System::ArrayPtr<uint8_t> System::BitConverter::GetBytes(float value)
参数类型描述
float要转换的浮点值

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(int) method

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

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

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(int16_t) method

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

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

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(int64_t) method

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

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

ReturnValue

表示指定值的 8 字节数组

另见

BitConverter::GetBytes(uint16_t) method

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

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

ReturnValue

表示指定值的 2 字节数组

另见

BitConverter::GetBytes(uint32_t) method

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

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

ReturnValue

表示指定值的 4 字节数组

另见

BitConverter::GetBytes(uint64_t) method

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

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

ReturnValue

表示指定值的 8 字节数组

另见