Interfaces are great for ensuring that classes are defined correctly, but I have seen code where an object is defined according to the interface instead of the class EG :
imyInterface X = new myClass();
instead of
myClass Y = new myClass();
where
myClass:imyInterface
{
......
}
In both definitions of objects “X “ & “Y” , then the object will be defined as a
myClass. The disadvantage of the definition for ‘X ’ is that in Visual Studio, clicking on
goto defintion, takes you to the interface defintion & not ...
Go to the complete details ...