The easiest method to sort a List of string or any type do the follow
If List is string type
listData.Sort((a, b) => a.Count().CompareTo(b.Count()));
If List is any Class type
listData.Sort((a, b) => a.GameName.CompareTo(b.GameName));
If List is string type
listData.Sort((a, b) => a.Count().CompareTo(b.Count()));
If List is any Class type
listData.Sort((a, b) => a.GameName.CompareTo(b.GameName));
No comments:
Post a Comment