c# list orderby string code example
Example 1: c# list sort by property string
var sortedQuery = sampleList.OrderBy(x => x.MyProperty);
Example 2: sort list c# by string
ListObject = ListObject.OrderBy(item => item.Property).ToList();
var sortedQuery = sampleList.OrderBy(x => x.MyProperty);
ListObject = ListObject.OrderBy(item => item.Property).ToList();