Implicit interface implemenations

A

ajj3085

Hi all,

Have a question..

I have an internal interface, and an internal class which implements
the interface.

I've been finding it odd that even though the interface is internal,
when I implictely implement the interface, the method must be marked
public. Not a huge deal, since the class which implements the
interface is internal also.. just find it odd.

Any idea why this is? This is with .Net 2.0.

Thanks
andy
 
J

Jon Skeet [C# MVP]

Have a question..

I have an internal interface, and an internal class which implements
the interface.

I've been finding it odd that even though the interface is internal,
when I implictely implement the interface, the method must be marked
public. Not a huge deal, since the class which implements the
interface is internal also.. just find it odd.

Any idea why this is? This is with .Net 2.0.

All members of an interface are implictly public, so must be
implemented with public methods.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top