SortableByPriorityCollectionSortByPriority Method |
Namespace: MailBee
Lower values are preferred. For instance, if the collection had 4 elements with the following priority values: 1, 0, 3, 0, then after calling this method, the elements would be reordered as: 0, 0, 1, 3.
If this method detects the collection is already sorted, no elements will be reordered. In other words, this method performs stable sort (in contrast to unstable sort when equal elements may be reordered).
This method can be used if the developer changes priority of elements already added to the collection and wants to get the collection re-ordered accordingly new values of priority.