I have a list populated with a custom data class, the list has column values string
(Type) as well as double
(Xo). I can successfully sort the list using two lines of code, is it possible to do the .Sort
in one line?
List.Sort((x, y) => x.Xo.CompareTo(y.Xo));
List.Sort((x, y) => string.Compare(y.Type, x.Type));