Oops concept c#
create an outer class containing mehod ,then inner class containing method now in main method access both outer and inner class method?how can we access plzz provide solution
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Harshad PansuriyaRank #1,124 · 1.6K reputationPosted Sep 11, 2015, 9:45 PM EDT
Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Sep 11, 2015, 10:25 PM EDT
class Father { public void SayHello() { Console.WriteLine("Hello"); } } class Son : Father { // SayHello exists public void SayBye() { Console.WriteLine("Catch you later!"); } }new Father().SayBye(); // Doesn't work new Son().SayHello(); // Works; inheritance new Son().SayBye(); // Works