If you mean non-generic IEnumerable, you must use Castor OfTypeto get first IEnumerable<T>, then you can use regular OrderBy/ calls OrderByDescending.
For instance:
IEnumerable test = new string[] { "abc", "x", "y", "def" };
IEnumerable<string> orderedByLength = test.Cast<string>()
.OrderBy(x => x.Length);
You can also do this by explicitly specifying the type in the query expression:
IEnumerable<string> orderedByLength = from string x in test
orderby x.Length
select x;
EDIT: now that the question is clarified, the form of the query expression is:
var query = from value in collection
orderby value.SomeProperty descending
select value;
source
share