no,you can not override the private virtual methodbcoz virtual method cannot be private!!!
Hi Atulya,Private virtual methods cannot be declared in the C# language. So no question comes to override i think.Seems interviewer was tweaking you :).
there is not allow to write virtual method as private so there is no question for override private virtual method
Hello AtulyaAs we know that the virtual method is designed to use in derived class by override concept in c# . We can declare virtual method private but at the compile time it through error (Virtual method cant be private). Even C# basic concept is private member cant be accessed outside the call regardless of by property. So finally its clear we cant declare virtual method as private and cant override it in derived class
as it is not possible to inherit private methods from parent class you cant override it.
No. It cannot inherited from other class due to private keyword
no u cant
No.And also the default access specifier in abstract methods is public.
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
2015© C# Corner. All contents are copyright of their authors.
C# Corner. All contents are copyright of their authors.