On Jul 10, 8:32 am, Sameeksha <Sameek...@discussions.microsoft.com>
wrote:
A c# design question - why interface methods are designed to be implicitly
public (that is, no access specifier) - for allowing flexibility to the
classes implementing the interface?
--
Thanks,
Sameeksha
MCAD.Net
Hi Sameeksha,
If your class implements an interface, you are implicitly agreeing
that your class supports the interface in its entirety. It does not
make sense to implement an interface and then hide some of the members
as "private" for example. Consider the problem from a client's
perspective... if you get an object and you find that it implements a
certain interface, you want to be able to call methods/properties on
that interface without first checking to see if each one is "public".
Hope this helps,
John