У меня ниже ObservableCollection<string>
. Мне нужно отсортировать это по алфавиту.
private ObservableCollection<string> _animals = new ObservableCollection<string>
{
"Cat", "Dog", "Bear", "Lion", "Mouse",
"Horse", "Rat", "Elephant", "Kangaroo", "Lizard",
"Snake", "Frog", "Fish", "Butterfly", "Human",
"Cow", "Bumble Bee"
};
Я пытался _animals.OrderByDescending
. Но я не знаю, как правильно его использовать.
_animals.OrderByDescending(a => a.<what_is_here_?>);
Как я могу это сделать?