using System; using System.Collections; namespace LabPuppy6 { /// /// Summary description for Class1. /// class filmList { static SortedList filmography = new SortedList(); [STAThread] static void Main(string[] args) { film f1 = new film("Mutts to You", 1938, "Charley Chase"); film f2 = new film("Three Little Sew and Sews", 1939, "Del Lord"); film f3 = new film("We Want Our Mummy", 1939, "Del Lord"); film f4 = new film("A-Ducking They Did Go", 1939, "Del Lord"); film f5 = new film("Yes, We Have No Bonanza", 1939, "Del Lord"); film f6 = new film("Saved by the Belle", 1939, "Charley Chase"); film f7 = new film("Calling all Curs", 1939, "Jules White"); film f8 = new film("Oily to Bed, Oily to Rise", 1939, "Jules White"); film f9 = new film("Three Sappy People", 1939, "Jules White"); filmography.Add("Mutts to You",f1); filmography.Add("Three Little Sew and Sews",f2); filmography.Add("We Want our Mummy",f3); filmography.Add("A-Ducking They Did Go",f4); filmography.Add("Yes, We Have No Bonanza",f5); filmography.Add("Saved by the Belle",f6); filmography.Add("Calling all Curs",f7); filmography.Add("Oily to Bed, Oily to Rise",f8); filmography.Add("Three Sappy People",f9); for (int i = 0; i < filmography.Count; i++) { film f = (film)filmography.GetByIndex(i); if(f.director == "Del Lord") { Console.WriteLine(filmography.GetKey(i)); } } } } }