On Fri, 2003-07-25 at 10:17, Yves Kurz wrote:
> Hallo..
> 
> maybe anyone of you can help me with this. Is it possible to write
> properties which uses indexers? 
> 
Hello Yves,

I see you are already hacking ;-).

C# does not support this syntax. It only supports having such a syntax
on the class itself.

The best way to support the syntax is to do the following:

public object [] O {
        get {return o;}
}

That will allow the same syntax as you want. You can also return a
collection, there are many examples of this in System.Web, especially in
HttpRequest.

-- Ben
_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to