Interface: Declaring a class with inherited interface
I'm not sure what this is call or how to google for an explanation but
here goes
let said I have a interface call IView and a class inherited IView call
View class. In some projects I see the below code:
IView view = new View();
Why do that? Why not just do
var view = new View();
Is there a purpose for declaring a interface then create a View object?
why not do the second step?
No comments:
Post a Comment