I would like to know if there is a way to get a ref to an array element in c# .
Something like this but without the pointers :
SomeClass *arr[5];
...
SomeClass** p = &arr[2];
So far I got this :
SomeClass arr[] = new SomeClass[5];
// Put something in the array
SomeClass p = arr[2]; // This will give me the initial object, not the array ref
p = new SomeClass(); // I want the array to now use this new object
SomeClassis a reference type, then you have a reference to the object atarr[2], and changing a property ofpwill change the same property inarr[2].SomeClass", you can store aFunc<SomeClass>andAction<SomeClass>instead.