Suppose I have ObservableCollection
of employee class
public ObservableCollection<Employee> employeeCollection = new ObservableCollection<Employee>();
public class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
public double MobileNumber { get; set; }
public string City { get; set; }
public int Age { get; set; }
public Employee() {}
}
now I am trying to sort the ObservableCollection
(“employeeCollection”)
by appropriate selection by user from combobox[it will be….Sort By FirstName….Sort By MobileNumber etc…]..
and it is required to get back sorted observable collection….
Means it should not be in form of “var” it should be
ObservableCollection<Employee>
So I can assign back it to “ItemsSource”
property of “ItemsControl”
…
Thanks……