Join Joe Marini for an in-depth discussion in this video Challenge: Getting information from a list, part of C#: Interfaces and Generics.
- Alright, time for another programming challenge.…In this challenge, we're going to use what we've learned…about working with generic collection classes to calculate…information based upon a set of data records.…In this case, we'll be using a set of…information about classic cars.…And I'm going to give you a bit of a head start by providing…a starting point with the data set already populated.…So let's open the starting point code.…And that is here in chapter three under lesson five.…Inside this folder is the program.cs file.…Ok, so here you can see I have a class named…"classic car," which contains fields for the make, model,…year, and current value. Down here in the main program,…I've written some code to create a generic list with…the classic car as its data type, which is then prepopulated…with some classic car data using this populate…data function, and that's down here.…
So you can see that we're adding a whole bunch of…information about some classic cars to the list.…So here is what your program is going to calculate.…
- Designing and implementing an interface
- Implementing multiple interfaces
- Using .NET-defined interfaces
- Understanding how generics improve program reliability
- Exploring .NET's generic data collection classes