I have a list of Person objects
class Person
{
string FirstName{get;set;}
int Age {get;set;}
}
Now in this Person objects list
Person1 has FirstName="Alan", Age=20
Person 2 has FirstName="Josephine", Age=21
I need to get a new List, where each list item has the first name concatenated with the age
List I need:
Alan:20
Josephine:21
...so on
I have this so far...
var PersonConcatenatedList= from p in PersonList
select new {firstName= p.FirstName, Age=p.Age};
err...but now how to ouput the desired list format ? :(
Any help will be greatly appreciated. thanks