c# - Merge sort days of week in order of weekday and not alphabetical -
i have object array string property represents weekdays. want write merge sort algorithm sort object array in order of weekdays.
i capable of writing merge sort algorithm wondering how sort in order of weekdays , not alphabet? in advance.
use collection objects supports custom comparators, or implement icomparable on object as demonstrated here. use static map of property ordering or if can map string property dayofweek enum use built-in ordering.
Comments
Post a Comment