I have a two dimensional array:
object[,] cells;
After initializing it, I want to insert a rectangular range in the middle.
Then to make room I need to shift a rectangular block down or right.
(As in you would do in Excel)
It seems this is not very easy with the above data structure.
Would a,
List < List < object > >
be easier to handle these kind of operations (there can be many such operations, so performance is really important)?
Yes, use a
List < List < object > >if you need to remove/insert items. Arrays cannot be re-sized and so it will not be possible to achieve what you want using arrays.