static void Main(string[] args) { SomethingClass somethingClass = new SomethingClass(); somethingClass.PrintThisText("HEY THERE"); //even though I'm calling .`PrintThisText` method here, this method will in turn call the `PrintText` method in `SomeOtherClass` }
static void Main(string[] args) { SomethingClass somethingClass = new SomethingClass(new SomeOtherClass()); somethingClass.doSomething("HEY THERE"); }
static void Main(string[] args) { SomethingClass somethingClass = new SomethingClass(); somethingClass.PrintThisText("HEY THERE"); }