I working with WPF and I have an Observablecollection<MyObj>
, and myObj class is:
MyObject
{
string happenAtMonth;
int value;
}
happendAtMonth is the name of the month. my observableCollection (MyObColl) will have these values for example:
MyObColl.Add(new MyObj("October", 3));
MyObColl.Add(new MyObj("January", 450));
MyObColl.Add(new MyObj("June", 15));
MyObColl.Add(new MyObj("Febraury", 125));
I need to sort this MyObColl by month The output should be like:
Value was 450 in January
Value was 125 in Febraury
Value was 15 in June
Value was 3 in October
How I would achieve this and sort with ObservableCollection by Month name? Thank you