Click here to Skip to main content
15,889,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Once an Interface is implemented all methods will be public in implemented class . How to reduce the scope of the implemented method?
Posted
Updated 11-Feb-15 19:21pm
v2
Comments
anup.bhunia 12-Feb-15 1:49am    
Probably abstruct class would be better fit than the interface for your situation. If you could explain your scenario, will get better answer or guidance.

Interface members are public by default.

How to Implement an Interface Without Making Members Public Using Explicit Interface Implementation[^] is a workaround that uses explicit interface implementation.
 
Share this answer
 
Interfaces are just that - interfaces. A public contract, nothing else. Think of interface as of specification which describes how should the implementation look to the outside world.If you want to make protected go for abstract base classes
Hope this helps
 
Share this answer
 
v2

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