Is it possible to have something like the following:
class C
{
public Foo Foos[int i]
{
...
}
public Bar Bars[int i]
{
.
Not in C#, no.
However, you can always return collections from properties, as follows:
public IList Foos
{
get { return ...; }
}
public IList Bars
{
get { return ...; }
}
IList
C whatever = new C();
Foo myFoo = whatever.Foos[13];
On the lines "return ...;" you can return whatever implements IList