SwapShort() public static method

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