Can you override private virtual methods?
Answers were Sorted based on User's Feedback
Answer / guest
No, moreover, you cannot access private methods in inherited
classes, have to be protected in the base class to allow any
sort of access
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / dsp
When you specify Virtual method as a private member it will
gives compilation error.So u on't
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / naveen
As a private acess level is visible to current class only
it will be meaning less to specify vitual method and more
over it must generate a compilation error.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kanan
No we can not declare method as "Private Virtual".
Is This Answer Correct ? | 0 Yes | 0 No |
It will give compilation error because virtual functions
can't be private.
Is This Answer Correct ? | 0 Yes | 0 No |
Difference between abstract classes and interfaces
Is int a struct in c#?
How can you access a private method of a class?
What exactly happens when we debug and build the program?
What is asp net in c#?
Is java better than c#?
What is yield return in c#?
What is a byte in c#?
What are different types of classes in c#?
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
Distinguish between system.string and system.text.stringbuilder classes?
What is final keyword in c#?