What do you use if you want to ensure that all methods and properties are implemented
c#, oop
Solution
Yep, use an interface. An interface is basically a contract saying "hey, you need to implement these members, or I'm not going to compile."
Problem
I was giving a test and got one question. QUESTION: What do you use if you want to ensure that all methods and properties are implemented? a)Inheritance. b)Polymorphism. c)Encapsulation d)Interface. I think its Interface. Am I right or the. ans is diff?