I have an object array that is supposed to hold objects of different classes. I need to write down the attributes of those classes but don't know how to access them.
For example:
object[] NationalTeam;
possibly holding:
class Swimmer
class Runner
etc.
with different attributes. Can't access them with NationalTeam[i]. Can it be done with overloading [] indexer? If yes, how?