SortableByPriorityCollectionSortByPriority Method
Sorts the items in the collection by their priority value.

Namespace: MailBee
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public void SortByPriority()

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.

See Also