Can you override private virtual methods?

Answers were Sorted based on User's Feedback



Can you override private virtual methods?..

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

Can you override private virtual methods?..

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

Can you override private virtual methods?..

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

Can you override private virtual methods?..

Answer / kanan

No we can not declare method as "Private Virtual".

Is This Answer Correct ?    0 Yes 0 No

Can you override private virtual methods?..

Answer / sudhir sheoran

It will give compilation error because virtual functions
can't be private.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Difference between abstract classes and interfaces

0 Answers  


Is int a struct in c#?

0 Answers  


How can you access a private method of a class?

0 Answers  


What exactly happens when we debug and build the program?

0 Answers  


What is asp net in c#?

0 Answers  






Is java better than c#?

0 Answers  


What is yield return in c#?

0 Answers  


What is a byte in c#?

0 Answers  


What are different types of classes in c#?

0 Answers  


what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?

0 Answers   Satyam,


Distinguish between system.string and system.text.stringbuilder classes?

0 Answers  


What is final keyword in c#?

0 Answers  


Categories