Hi
How do I override an indexer on a C# class?
public class IndexerContained{
private Dictionary<string, string> _inner = new
Dictionary<string,
string>{
{ “key1”, “value1” },
{ “key2”, “value2” },
{ “key3”, “value3” },
{ “key4”, “value4” }
};
public virtual string this[string name]{
get { return _inner[name]; }
set { _inner[name] = value; }
}
}
I would like to override that indexer with something like
class IndexerContainedMock
def []=(*args)
# nothing here
end
end
Am I doing it wrong or is that not implemented yet?
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
GSM: +32.486.787.582
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)