static private GetBytesSwap ( bool swap, byte ptr, int count ) : byte[] | ||
swap | bool | |
ptr | byte | |
count | int | |
return | byte[] |
unsafe static byte[] GetBytesSwap (bool swap, byte *ptr, int count)
{
byte [] ret = new byte [count];
if (swap){
int t = count-1;
for (int i = 0; i < count; i++) {
ret [t-i] = ptr [i];
}
} else {
for (int i = 0; i < count; i++) {
ret [i] = ptr [i];
}
}
return ret;
}