Vivek Bernard
Vivek Bernard

Reputation: 2073

How can I change a process's BasePriority using .NET?

I'm writing an application where a user can change the Application's (process's) Basepriority

How can I do this in .Net?

Its seems I can only "get" the Basepriority value but I cant "set" it.

Upvotes: 3

Views: 2551

Answers (1)

Vivek Bernard
Vivek Bernard

Reputation: 2073

Found it

    System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;

i was looking at System.Diagnostics.Process.GetCurrentProcess ().BasePriority which is readonly

(i know lame...)

Upvotes: 4

Related Questions