I have a problem using Linq to order a structure like this :
public class Person
{
public int ID { get; set; }
public List Attribu
Why don't you use a key-value dictionary instead of your List
Update - like this:
public class Person
{
public Dictionary Attributes = new Dictionary();
}
List people = new List();
Person rebecca = new Person();
rebecca.Attributes["Age"] = "32";
rebecca.Attributes["FirstName"] = "Rebecca";
rebecca.Attributes["LastName"] = "Johnson";
rebecca.Attributes["Gender"] = "Female";
people.Add(rebecca);
var PeopleInAgeOrder = people.OrderBy(p => p.Attributes["Age"]);