BitSharp.Common.Bits.GetBytes C# (CSharp) Method

GetBytes() public static method

public static GetBytes ( Int16 value ) : byte[]
value System.Int16
return byte[]
        public static byte[] GetBytes(Int16 value)
        {
            return Order(BitConverter.GetBytes(value));
        }

Same methods

Bits::GetBytes ( Int32 value ) : byte[]
Bits::GetBytes ( Int64 value ) : byte[]
Bits::GetBytes ( UInt16 value ) : byte[]
Bits::GetBytes ( UInt256 value ) : byte[]
Bits::GetBytes ( UInt32 value ) : byte[]
Bits::GetBytes ( UInt64 value ) : byte[]

Usage Example

Ejemplo n.º 1
0
 public void ToByteArray(byte[] buffer, int offset)
 {
     Buffer.BlockCopy(Bits.GetBytes(this.part4), 0, buffer, 0 + offset, 8);
     Buffer.BlockCopy(Bits.GetBytes(this.part3), 0, buffer, 8 + offset, 8);
     Buffer.BlockCopy(Bits.GetBytes(this.part2), 0, buffer, 16 + offset, 8);
     Buffer.BlockCopy(Bits.GetBytes(this.part1), 0, buffer, 24 + offset, 8);
 }
All Usage Examples Of BitSharp.Common.Bits::GetBytes