public void Setup() { AList.Add("Bill"); AList.Add("Phil"); AList.Add("Frank"); AList.Add("Bobby"); }
public void Setup() { SAList.Add("Bill"); SAList.Add("Phil"); SAList.Add("Frank"); SAList.Add("Bobby"); Iterator = SAList.Iterator; }
public void Covariance() { var a = new SortedArrayList <Mammal>((a1, a2) => a1.Name.CompareTo(a2.Name)); a.Add(new Mammal("B", 12)); a.Add(new Canidae("A", 12, true)); IReadOnlyList <Animal> baseObjects = a; for (int i = 0; i < baseObjects.Count; ++i) { Console.Write(baseObjects[i].Name); } IWritableCollection <Canidae> dogs = a; dogs.Add(new Canidae("C", 8, false)); }