List<ProcessPriorityClass> a = Enum.GetValues(typeof(ProcessPriorityClass)).Cast<ProcessPriorityClass>().ToList();
The enum has values like so
// Summary:
// Indicates the priority that the system associates with a process. This value,
// together with the priority value of each thread of the process, determines
// each thread's base priority level.
public enum ProcessPriorityClass
{
// Summary:
// Specifies that the process has no special scheduling needs.
Normal = 32,
//
// Summary:
// Specifies that the threads of this process run only when the system is idle,
// such as a screen saver. The threads of the process are preempted by the threads
// of any process running in a higher priority class.
Idle = 64,
//
// Summary:
// Specifies that the process performs time-critical tasks that must be executed
// immediately, such as the Task List dialog, which must respond quickly when
// called by the user, regardless of the load on the operating system. The threads
// of the process preempt the threads of normal or idle priority class processes.
High = 128,
//
// Summary:
// Specifies that the process has the highest possible priority.
RealTime = 256,
//
// Summary:
// Specifies that the process has priority above System.Diagnostics.ProcessPriorityClass.Idle
// but below System.Diagnostics.ProcessPriorityClass.Normal.
BelowNormal = 16384,
//
// Summary:
// Specifies that the process has priority above System.Diagnostics.ProcessPriorityClass.Normal
// but below System.Diagnostics.ProcessPriorityClass.High.
AboveNormal = 32768,
}
So it always sorts based on the value (So AboveNormal is the last item in the list) and I want them sorted alphabetically. Anyone got any tips on the best (efficient) way of sorting this (I guess sort ot on the int value in reverse)

New Topic/Question
Reply



MultiQuote






|