SwapShort() public static method

Toggles the endianness of the specified 16-bit integer.
public static SwapShort ( short value ) : short
value short
return short
コード例 #1
0
 public IByteBuf WriteUnsignedShort(int value)
 {
     _buf.WriteUnsignedShort(unchecked ((ushort)ByteBufferUtil.SwapShort((short)value)));
     return(this);
 }
コード例 #2
0
 public IByteBuf WriteShort(int value)
 {
     _buf.WriteShort(ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
コード例 #3
0
 public IByteBuf SetShort(int index, int value)
 {
     _buf.SetShort(index, ByteBufferUtil.SwapShort((short)value));
     return(this);
 }
コード例 #4
0
 public short ReadShort()
 {
     return(ByteBufferUtil.SwapShort(_buf.ReadShort()));
 }
コード例 #5
0
 public short GetShort(int index)
 {
     return(ByteBufferUtil.SwapShort(_buf.GetShort(index)));
 }