docs = docs.OrderBy(d => docsIds.IndexOf(d.Id)).ToList();
More Related Contents:
- Preserving order with LINQ
- Alphanumeric sorting using LINQ
- How do I sort strings alphabetically while accounting for value when a string is numeric?
- How to check if IEnumerable is null or empty?
- Check for any element that exists in two collections
- LINQ .Any VS .Exists – What’s the difference?
- Count property vs Count() method?
- LINQ order by null column where order is ascending and nulls should be last
- List sort based on another list
- The data source does not support server-side data paging
- How to Quickly Remove Items From a List
- LINQ Custom Sort
- List complex sorting
- Sort one list by another
- Compare Two Lists Via One Property Using LINQ
- Better way to sort array in descending order
- Use LINQ to move item to top of list
- How to display words that appear more than 'x' times in a text? [closed]
- Retrieving Property name from lambda expression
- Best way to randomize an array with .NET
- Calling generic method with a type argument known only at execution time [duplicate]
- Value cannot be null. Parameter name: source
- LINQ join two DataTables
- Getting pair-set using LINQ
- Cannot implicitly convert type ‘System.Collections.Generic.IEnumerable’ to ‘System.Collections.Generic.List
- Does C# have a way of giving me an immutable Dictionary?
- AddRange to a Collection
- How should I use properties when dealing with read-only List members
- Linq OrderBy against specific values
- What is the best way to check two List lists for equality in C#