score:9
Accepted answer
try this:
list<person> sortedlist = people.orderby(o => o.age).tolist();
score:8
people.sort((p1, p2) =>
{
return p1.age - p2.age;
});
Source: stackoverflow.com
Related Query
- How to sort class list by integer property?
- How to get list for a property of a class from its collection
- Sort List of parent class by property of subclass using LINQ
- How can I create list of nested classes where a certain property of each nested class is true?
- How to sort list on multiple properties in one line of code in Linq
- Based on a list of class objects, how to create a list of valid property names?
- How to sort a list of a custom class by a variable in that custom class? c#
- How to sort a List with LINQ using Nested Property
- How to sort a list by a specific property in .NET 2.0?
- How to sort a list of objects by a property of a nested list with Linq?
- C# How to sort a list of objects by any property
- How to sort a hashtable of class values by their property in c#?
- How to write SQL translateable linq code that groups by one property and returns distinct list
- How can I sort generic list DESC and ASC?
- C#: How to convert a list of objects to a list of a single property of that object?
- How to Sort a list by field
- how to check if property value of each list member is same
- How to get/find an object by property value in a list
- Sort a List by a property and then by another
- How to sort a List collection of classes with properties in them?
- C# : How to sort a list of object based on a list of string
- How to check if all of the elements in a list return true for a property using Linq?
- C#: sort list of objects by DateTime property that is nullable
- How To Sort A List Of Lists?
- How To Sort A List With Dynamic Objects
- In c#, how to sort list of doubles by mantissa?
- How to sort a collection based on a subcollection property
- How can I use linq to return integers in one array that do not match up with an integer property of another array?
- How to order a list by property and group the elements in HTML Razor?
- How do you sort a String List by the number of words matched with an Array in Linq
More Query from same tag
- Select columns with specific condition using Linq to SQL
- How to write GroupJoin Lambda Expression in Linq query?
- Linq - Cannot implicitly convert type 'System.Collections.Generic.IEnumerable
- linq query only headers that have details
- Problem trying to populate a text box using LINQ
- Where Not In OR Except simulation of SQL in LINQ to Objects
- Entity Framework List Contains in lambda
- Linq Expression Decimal Contains method
- Linq List contains specific values
- C# sorting a List of Strings by a List of Doubles
- How to use LINQ to order within groups
- linq to xml performance
- Retain fetched old record in a variable after SaveChanges() are called in EF
- Adding fields that can contain null together in lambda/linq
- LINQ to Entities does not recognize the method ' '
- How to detect if element exist using a lambda expression in c#?
- How to create jQuery datatable with multiple child rows(nested table)?
- How can I get a list of CollectionBase items?
- Linq to SQL or Linq to DataSet?
- Performing a wildcard search
- LINQ: Creating an IEnumerable<T> from another IEnumerable<T>?
- Entity Framework, Table Per Type and Linq - Getting the "Type"
- C# LInq Subquery Issue
- Not Exists using Linq
- How to format xml using linq?
- Linq to NHibernate Expression Tree with nested relation condition
- Need help with this basic Contains<>() extension method and Lambda expressions
- Bind LINQ data via stored procedure to Gridview
- Linq Select projection cannot be applied to single record
- Convert 'ArrayList' to 'List<string>' (or 'List<T>') using LINQ