All, I have come across the following property and object declaration. The first returns an interface, and the second I am not too sure about
public IConfig this[int index]
{
get { return (IConfig)configList[index]; }
}
object IList.this[int index]
{
get { return configList[index]; }
set { }
}
I have never seen this type of declaration, namely the public IConfig this[int index]
with square brackets and the odd use of this
and object IList.this[int index]
. Can some one explain the two notations?
I have attempted to look in the books I have, and use Google but I am unsure what I am searching for. Thanks for your time.
Edit. These are in a class that inherits as follows
public class ConfigCollection : ICollection, IEnumerable, IList
{
....
}