Interface Behaves Differently in Visual Basic

Learning programming language design or framework internals is a bit interesting!!!.

On a project development phase, my guru came up with a situation where Interface behaves a bit strange. In Visual Basic we can implement an interface member with a private method, and then call that method via the interface.

ahh!!, So what then does “Private” means?

This implementation violates the concept “Encapsulation” right?

The question in detail is available on StackOverflow :

This feature of VB and C# makes developers confused!!!

Here is an awesome explanation of Eric Lippert from Microsoft, who was a developer of the Visual Basic, VBScript, JScript and C# compilers and a member of the C# language design committee.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s