So my understanding of C# is that when dealing with an array of objects (rather than simple types) the array will simply be a consecutive array of references to objects, hence the need to call 'new' on each element to actually create the object for it.
Block[] blocks = new Block[10];
foreach(Block block in blocks)
{
block = new Block();
}
This I would imagine would spread 'Block' instances all over memory.
I want my actual objects to be stored consecutively in memory is there any way to do this in C#?
blockdoes not point to an element in the array. It is pretty much assigning to a local variable. (IIRC, C# disallows this too).