J
Jeremy McPeak
I am writing a collection. I downloaded the Rotor kit and started looking at
how the classes in System.Xml are written and am using them as a guide. For
my collection, I thought I'd use XmlNodeList as my pattern.
Two particular things stand out:
public abstract XmlNode Item(int i);
and
public virtual XmlNode this [int index] {}
I created an indexer in my collection class without a problem. When I added
an Item() method to it, however, I was told that Item was already in use.
The debugger pointed to the indexer as the culprit. The compiler will not
continue.
So my question is this: How can I use an indexer and an Item() method in the
same class?
Thanks!
how the classes in System.Xml are written and am using them as a guide. For
my collection, I thought I'd use XmlNodeList as my pattern.
Two particular things stand out:
public abstract XmlNode Item(int i);
and
public virtual XmlNode this [int index] {}
I created an indexer in my collection class without a problem. When I added
an Item() method to it, however, I was told that Item was already in use.
The debugger pointed to the indexer as the culprit. The compiler will not
continue.
So my question is this: How can I use an indexer and an Item() method in the
same class?
Thanks!