2 using System.Collections;
3 using System.Collections.Generic;
7 public static void Main ()
9 FooList<string> l = new FooList<string> ();
13 static void Foo<T> (IList<T> list)
15 ICollection coll = list as ICollection;
17 Console.WriteLine (coll.Count);
21 public class FooList<T> : IList<T> {
23 public int IndexOf (T item)
25 throw new NotImplementedException ();
28 public void Insert (int index, T item)
30 throw new NotImplementedException ();
33 public void RemoveAt (int index)
35 throw new NotImplementedException ();
38 public T this [int index]
40 get { throw new NotImplementedException (); }
41 set { throw new NotImplementedException (); }
44 public void Add (T item)
46 throw new NotImplementedException ();
51 throw new NotImplementedException ();
54 public bool Contains (T item)
56 throw new NotImplementedException ();
59 public void CopyTo (T [] array, int arrayIndex)
61 throw new NotImplementedException ();
64 public bool Remove (T item)
66 throw new NotImplementedException ();
71 get { throw new NotImplementedException (); }
74 public bool IsReadOnly
76 get { throw new NotImplementedException (); }
79 IEnumerator<T> IEnumerable<T>.GetEnumerator ()
81 throw new NotImplementedException ();
84 public IEnumerator GetEnumerator ()
86 throw new NotImplementedException ();