Suppose I have an array or any other collection for that matter in class and a property which returns it like following:
public class Foo
{
public IList<Bar> Bars{get;set;}
}
Now, may I write anything like this:
public Bar Bar[int index]
{
get
{
//usual null and length check on Bars omitted for calarity
return Bars[index];
}
}