Tuesday, January 14, 2020

C# - How to sort generic list by item value

private List<ConstellationIndex> ConstellationsIndex = new List<ConstellationIndex>();
...
this.ConstellationsIndex.Sort( (x, y) => x.Constellation.CompareTo( y.Constellation ) );

No comments:

Post a Comment