Is this the best way to express this?

I want to use the built in .NET array function Copy (Array.Copy Method (System) | Microsoft Learn)

This is how I invoked it:

var bufsrc : byte[] = ...;
var bufdest : byte[] = ...;
[].Copy(bufdest, 0, bufsrc, 0, bufsrc.length);

Is that right? [ ].Copy is, well, ugly? But it does seem to indicate the type name…

try System.Array.Copy

Yes, like elveatles has suggested, but your format is a little off. The correct format is: Copy(source, startSourceIndex, destination, startDestinationIndex, length). For example,

System.Array.Copy(bufsrc, 0, bufdest, 0, bufsrc.length);

Since, the source index and destination index start at 0, you can also use this format:

System.Array.Copy(bufsrc, bufdest, bufsrc.length);

Thanks all, System is much cleaner :slight_smile: