Assuming we have a simple Person class:
public Person this[int index]
{
get { return (Person)arPeople[index]; }
set { arPeople.Insert(index, value); }
}
Let’s assume i have an array with N Person objects. If I try accessing non-existing index (N+1 for example), Should I throw exception in this case or return null? What are the considerations in this case?
Thanks in advance…