public void DoSomething() { var process1 = new Process1(); var process2 = new Process2(); var process3 = new Process3(); process1.SetProcess(process2); process2.SetProcess(process3); process1.RunProcess(); }
static void Main(string[] args) { Process1 proc1 = new Process1(); Process2 proc2 = new Process2(); Process3 proc3 = new Process3(); proc1.SetProcess(proc2); proc2.SetProcess(proc3); proc1.RunProcess(); }