
I have a code that i have to do it through LINQ
var airlineNameList = new List<string>();
foreach (DTTrip trip in contract_.Trips)
{
foreach (DTFlight flight in trip.ListOfFlights)
{
airlineNameList.Add(flight.AirLineName);
}
}
How can do it through LINQ.
Note: contract_ is the object of class.
Please Help..
Don’t you also need
Distinct?