Continue .Net Treat to Object


Recent I post that how .Net treat objects. Just in continuing the things here.

In one of my program i need to make a 2D array of a Class. Now, I need a copy of that array object in some other function.

So far so good, than I try the basic what come to my mind should work

MyFunction (MyArrayObject)

But this passes the object reference. Now, I try another thing

MyFunction (MyArrayObject.Clone)

but still it doesn’t work.

So, I just do special efforts to make a new array and copy each value manually.

So the moral is :

You cannot pass an multidimensional array of class object byVal even by cloning it. You need to do manual effort to complete this task