In my application there are 5 methods,in all methods there are update queries. Methods are depedent on each other. If first method runs successfully,second is called,second runs successfully third is called,third runs successfully fourth is called,fourth runs successfully fifth is called.
here is code
public void method1()
{
int result = cmd.ExecuteNonQuery();
if(result > 0)
method2();
}
public void method2()
method3();
public void method3()
method4();
public void method4()
method5();
I want to write this same code without using if statement,switch case or ternary operators. please guide me on how to do this.