Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to hidden interface method's in derived class using C#
Please help me .
Posted

You can't. It would be a bad idea anyway, because it would violate one of the principles of Object Oriented Design: Polymorphism[^]

A subclass should always behave like its baseclass if it's treated as such.

For what you're trying to accomplish it would probably the best way to encapsulate[^] the class whose methods you want to hide in another class and have the latter expose only the methods you want to expose.
 
Share this answer
 
Um. Interfaces don't have "hidden" methods - they don't have any methods at all until they are derived, and those are always "public" anyway!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900