I have this LINQ Query:
TempRecordList = new ArrayList(TempRecordList.Cast().OrderBy(s => s.Substring(9, 30)).ToArray());
It w
As already mentioned, the OrderBy()
method takes a comparer as a second parameter.
For strings, you don't necessarily have to implement an IComparer
. You might be fine with System.StringComparer.CurrentCulture
(or one of the others in System.StringComparer
).
In your exact case, however, there is no built-in comparer which will handle also the -
after letter sort order.