I have array of objects
MyClass MyArr[10];
In method of one element of array ( MyArr[j] ) I need to access to method of another element in this array ( MyArr[i].Method2(arg) ).
How I Can do this?
Access from one element of array to another element of array?
There’s lots of ways. Some are:
MyArra static variable of theMyClassclassMyArr[i]as a parameter to the method call onMyArr[j]