INNER CODE UNIT · C#
bytes
OpenKH/OpenKh · Binarysharp.MSharp/MemorySharp.cs:329
var bytes = ReadBytes(address, MarshalType<T>.Size * count, isRelative);
// If we check the type we can gain an additional boost of speed
if (typeof (T) != typeof (byte))
{
for (var i = 0; i < count; i++)
{
array[i] = MarshalType<T>.ByteArrayToObject(bytes, MarshalType<T>.Size * i);
}
}
else
{
// Just copy the bytes
Buffer.BlockCopy(bytes,0,array,0,count);
}
return array;
}