BinaryPrimitives.TryWriteInt16BigEndian(Span<Byte>, Int16) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将 Int16 以大字节序形式写入字节范围。
public:
static bool TryWriteInt16BigEndian(Span<System::Byte> destination, short value);
public static bool TryWriteInt16BigEndian (Span<byte> destination, short value);
static member TryWriteInt16BigEndian : Span<byte> * int16 -> bool
Public Shared Function TryWriteInt16BigEndian (destination As Span(Of Byte), value As Short) As Boolean
参数
- value
- Int16
要写入到字节范围内的值。
返回
如果范围足够大,可以包含 Int16,则为 true;否则为 false。
注解
将恰好 2 个字节写入范围开头。