- Create a console application and add a class called LambdaExample to the console application. Add a property to this class called FavThings:
public class LambdaExample { public string FavThings { get; set; } }
- In the console application, create a List<LambdaExample> object and add a few of your favorite things to this list:
List<LambdaExample> MyFavoriteThings = new List<LambdaExample>(); LambdaExample thing1 = new LambdaExample(); thing1.FavThings = "Ice-cream"; MyFavoriteThings.Add(thing1); LambdaExample thing2 = new LambdaExample(); thing2.FavThings = "Summer Rain"; MyFavoriteThings.Add(thing2); LambdaExample thing3 = new LambdaExample(); thing3.FavThings = "Sunday morning snooze"; MyFavoriteThings.Add(thing3); ...