Exercise: Find Your Favorite Movies
Play around with our catalog of movies.
We'll cover the following
Write your first LINQ query
Now, it’s your turn!
- Add your movies to the code sample and find which ones are your favorite movies.
- Next, find all the films released in the year you were born. Fill in the body of the
WasReleasedOn
method. It should check if a movie’s release year matches the given year. - Then, inside the
FindMoviesReleasedOn
method, write a LINQ query to filter themovies
collection using theWasReleasedOn
method from step 2.
There are some instructions as comments in the code sample below. Take your time to go through them. We are working with your answers in the following exercises and lessons.
Get hands-on with 1400+ tech skills courses.