public static PerformActionOnAllSortedListWrappers ( SortedList sortedList, Action |
||
sortedList | SortedList | |
action | Action |
|
return | void |
public static void PerformActionOnAllSortedListWrappers(SortedList sortedList, Action<SortedList> action)
{
// Synchronized returns a slightly different version of Stack
SortedList[] sortedListTypes =
{
(SortedList)sortedList.Clone(),
SortedList.Synchronized(sortedList)
};
foreach (SortedList sortedListType in sortedListTypes)
{
action(sortedListType);
}
}