public void Method1() { MyClass2 obj = new MyClass2(); obj.MyEvent += (s, e) => { OnMyEvent(); }; obj.Method1(); }
public void Method1() { MyClass2 obj = new MyClass2(); obj.SomeEvent += obj_SomeEvent; obj.Method1(); }
static void Main(string[] args) { MyClass1 c1 = new MyClass1(); c1.Method1().Method2(); MyClass2 c2 = new MyClass2(); c2.Method1().Method2().Method3(); }
public void Method1() { obj.Method1(); }