Unsafe.CopyBlock and Unsafe.CopyBlockUnaligned have the destination as first parameter and source as second. This is kinda confusing as all other copy methods in .NET have source as first and destination as second. Wouldn't it be better to follow the unofficial "standard" ?
Buffer.BlockCopy (Array src, int srcOffset, Array dst, int dstOffset, int count);
Buffer.MemoryCopy (void* source, void* destination, long destinationSizeInBytes, long sourceBytesToCopy);
Array.Copy (Array sourceArray, Array destinationArray, int length);
File.Copy (string sourceFileName, string destFileName);
Unsafe.Copy<T> (void* destination, ref T source);
Unsafe.CopyBlock(void* destination, void* source, uint byteCount);
As you can see it's always source first, except on Unsafe.Copy methods.
This would break all consumers of the API, so it can't be changed. The best thing you could do here (and is something that's recommended to do when a method has multiple parameters of the same type in a non-obvious order) is to use named arguments so that the compiler will do The Right Thing:tm: for you. Additionally, with this 7.2-introduced feature, you don't even need to name every argument.
Unsafe.CopyBlock(source: s, destination: d, 256);
CopyBlock does follow the "unofficial" standard - that of the IL cpblk instruction that this method exposes.
Most helpful comment
CopyBlockdoes follow the "unofficial" standard - that of the ILcpblkinstruction that this method exposes.