there are three methods called in a backgroundworker_dowork() event in c# .net 4. I want to execute three methods synchronously. that is, 2nd method will execute after 1st method is fully executed and 3rd method will execute when 2nd method is fully executed. because 2nd method can exetue properly only when 1st method is fully executed. but in the background worker all three methods are executed asynchronously that i don't want.

How to solve it?

Thanks in advance.

Get the current process and set its priority.

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

Use the following property........................

System.Threading.ThreadPriority

Priority won't help you here. Just execute them in one (1) Backgroundworker, calling each method in turn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.