T
Tony Johansson
Hi
I know that IList<T> support IList because we can write as I have done in
main below.
But why is not this documented in MSDN.
I have listed all the relevant interface declaration below and there no sign
of that IList<T> support IList.
I had hopped to see something like public interface IList<T> : IList
public static void Main()
{
List<string> stringList = new List<string>();
stringList.Add("Test");
IList theList = (IList)stringList;
object firstItem = theList[0];
}
public interface IList<T> : ICollection<T>,
IEnumerable<T>, IEnumerable
public interface ICollection<T> : IEnumerable<T>,
IEnumerable
public interface IEnumerable<T> : IEnumerable
[ComVisibleAttribute(true)]
[GuidAttribute("496B0ABE-CDEE-11d3-88E8-00902754C43A")]
public interface IEnumerable
//Tony
I know that IList<T> support IList because we can write as I have done in
main below.
But why is not this documented in MSDN.
I have listed all the relevant interface declaration below and there no sign
of that IList<T> support IList.
I had hopped to see something like public interface IList<T> : IList
public static void Main()
{
List<string> stringList = new List<string>();
stringList.Add("Test");
IList theList = (IList)stringList;
object firstItem = theList[0];
}
public interface IList<T> : ICollection<T>,
IEnumerable<T>, IEnumerable
public interface ICollection<T> : IEnumerable<T>,
IEnumerable
public interface IEnumerable<T> : IEnumerable
[ComVisibleAttribute(true)]
[GuidAttribute("496B0ABE-CDEE-11d3-88E8-00902754C43A")]
public interface IEnumerable
//Tony