Exemple #1
0
        public Manager()
        {
            movieTable = new SortedDictionary<int, Movie>();

            Movie movie1 = new Movie(1961, "WestSide Story", "Jerome Robbins");
            Movie movie2 = new Movie(1972, "The Godfather", "Francis Ford Coppola");
            Movie movie3 = new Movie(1984, "Amadeus", "Milos Forman");
            Movie movie4 = new Movie(2007, "No Country for Old Men", "Ethan & Joel Coen");

            movieTable.Add(movie1.Year, movie1);
            movieTable.Add(movie2.Year, movie2);
            movieTable.Add(movie3.Year, movie3);
            movieTable.Add(movie4.Year, movie4);
        }
Exemple #2
0
 //adds a movie to the dictionary
 public void AddMovie(int year, String title, String director)
 {
     Movie movie = new Movie(year, title, director);
     movieTable.Add(movie.Year, movie);
 }