public void TestListExplicitImplementation() { var list = new List2 <int>(); Assert.AreEqual(0, list[0]); Assert.True(list.Contains(0)); Assert.AreEqual(1000, list.Count); Assert.False(list.IsReadOnly); Assert.Null(list.GetEnumerator()); Assert.AreEqual(2000, list.IndexOf(0)); Assert.True(list.Remove(0)); var a = new int[] { 1, 2 }; list.CopyTo(a, 0); Assert.AreEqual(0, a[1]); IList <int> list2 = new List2 <int>(); Assert.AreEqual(0, list2[0]); Assert.True(list2.Contains(0)); Assert.AreEqual(1000, list2.Count); Assert.False(list.IsReadOnly); Assert.Null(list2.GetEnumerator()); Assert.AreEqual(2000, list2.IndexOf(0)); Assert.True(list2.Remove(0)); var a2 = new int[] { 1, 2 }; list2.CopyTo(a, 0); Assert.AreEqual(2, a2[1]); }