I have a list of strings shows below. I want to sort the name based on the Start with value. I try some cases but fails. Example List has data like,
name: "Bible Reading", name: "Scripture Reading", name: "Ready Set", name: "Career Readings", name: "Reading-Berks" I pass the queryValue as "read" but I can not be ordering based on the values.
IOrderedEnumerable<string> name = result.Select(x => x.name) .OrderBy(i => i.StartsWith(queryValue)); The expected output,
name: "Ready Set", name: "Reading-Berks" name: "Bible Reading", name: "Scripture Reading", name: "Career Readings",