How can we use indexers if we are using array of objects???
For a single object:
static void Main(string[] args)
{
MYInd mi = new MYInd();
mi[1] = 10;
Console.WriteLine(mi[1]);
mi[2, 10] = 100;
Console.WriteLine(mi[2]);
Console.WriteLine(mi[3, 10]);
What should be done for array of objects?
MYInd[] mir = new MYInd[3];
How can we use each object and the indexer?
You have a couple of options, if you want to iterate you do
If you want to pick out a specific
MYInd
from the array you can do it in one stepor in two steps