I have a class
public class Test
{
public string Value { get; set; }
}
and then
List<Test> values = new List<Test>() //contains 10 items
Some Items in the list their Value property can start with the character >
Example:
Name
Something
Example
> Another one
Demo
Student
> Home
How can I sort my list of objects so that the first items in the list are sorted alphabetically and the ones that start with >
are sorted alphabetically as well but are at the end of the list?
This is what I did so far:
values.Where(x => !x.Value.StartsWith(">")).OrderBy(x => x.Value);