refactoring - builds ok
This commit is contained in:
@@ -177,15 +177,25 @@
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static Byte[] GetBytesBE(this UInt32 value)
|
||||
{
|
||||
var bytes = new Byte[2];
|
||||
|
||||
bytes[0] = (Byte)(value >> 24);
|
||||
bytes[1] = (Byte)(value >> 16);
|
||||
bytes[2] = (Byte)(value >> 8);
|
||||
bytes[3] = (Byte)value;
|
||||
|
||||
public static Byte[] GetBits(this Byte _byte)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static Byte[] GetBits(this Byte @byte)
|
||||
{
|
||||
var bits = new Byte[8];
|
||||
|
||||
for (var i = 0; i < 8; i++)
|
||||
{
|
||||
bits[i] = (Byte)((_byte >> i) & 1);
|
||||
bits[i] = (Byte)((@byte >> i) & 1);
|
||||
}
|
||||
|
||||
return bits;
|
||||
|
||||
Reference in New Issue
Block a user