'Declaration Public ReadOnly Property SortedFields As SortedTaskFieldsCollection
public SortedTaskFieldsCollection SortedFields {get;}
The SortedFields collection provides a way to sort the UltraCalendarInfo's Tasks collection, and each descendant Tasks collection therein, on multiple field criteria. For example, to sort the Tasks collection on the value of the task's Name property in ascending order, the syntax would appear as follows: UltraCalendarInfo.Tasks.SortedFields.Add( SortableTaskFields.Name, SortOrder.Ascending )
The Tasks collections can be sorted by more than one property value. For example, to sort ascendingly on the StartDateTime property, and then descendingly on the Duration property, two members would be added to the collection, like so: UltraCalendarInfo.Tasks.SortedFields.Add( SortableTaskFields.StartDateTime, SortOrder.Ascending ) UltraCalendarInfo.Tasks.SortedFields.Add( SortableTaskFields.Duration, SortOrder.Descending ) This would result in the Tasks in each collection being sorted primarily by the value of the StartDateTime property. Tasks whose StartDateTime are equals would then be sorted on the value of the Duration property, such that the task with longer durations would appear before those of shorted duration.
Sorting is not supported for all Task properties; for example, sorting on the Dependencies collection is not supported as no meaningful sort criteria can be assumed by default. The SortedTaskFieldsCollection's Comparer property can be used to implement custom sorting; set the property to reference a custom IComparer(Of Task) implementation, and sorting will be delegated to this implementation.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2