[Mono-list] properties with indexers.
Yves Kurz
ml_yves@magnific.ch
25 Jul 2003 16:17:54 +0200
Hallo..
maybe anyone of you can help me with this. Is it possible to write
properties which uses indexers?
I tried someting like this but i can't compile it:
class A {
protected object [] o;
public object O [int i] {
get { return o[i]; }
set { o[i] = value; }
}
}
mcs complains:
syntax error, expecting OPEN_BRACE OPEN_PARENS DOT COMMA SEMICOLON
ASSIGN
A.cs(3) error CS8025: : Parsing error
Mono.CSharp.yyParser.yyException: irrecoverable syntax error
in <0x00865> 00 Mono.CSharp.CSharpParser:yyparse
(Mono.CSharp.yyParser.yyInput)
in <0x00079> 00 Mono.CSharp.CSharpParser:parse ()
Compilation failed: 1 error(s), 0 warnings
Thank you very much..