public String deleteMovieByIndex(int i) { String message = ""; if (i >= 0 && i < movies.Count) { Movie m = movies[i]; message = m.getName() + " has been removed successfully."; movies.RemoveAt(i); } else { message = "The index " + i + " does not refer to a movie in the database."; } return(message); }
public override Boolean Equals(Object o) { if (this == o) { return(true); } if (!(o.GetType() == typeof(Movie))) { return(false); } Movie movie = (Movie)o; return(object.Equals(getName(), movie.getName()) && getRating() == movie.getRating() && getGenre() == movie.getGenre()); }