Understanding interfaces [closed]
- by user985482
Possible Duplicate:
When to use abstract classes instead of interfaces and extension methods in C#?
Why are interfaces useful?
What is the point of an interface?
What other reasons are there to write interfaces rather than abstract classes?
What is the point of having every service class have an interface?
Is it bad habit not using interfaces?
I am reading Microsoft Visual C# 2010 Step by Step which I feel it is a very good book on introducing you to the C# language. I have just finished reading a chapter on interfaces and although I understood the syntax of creating and using interfaces I have trouble of understanding the point on why should I use them?
Correct me If I am wrong but in an interface you can only declare methods names and parameters.The body of the method should be declared in the class that inherits the interface.
So in this case why should I declare an interface if I am going to declare the entire method in the class that inherits that interface?
What is the point?
Does this have something to do with the fact that a class can inherit multiple interfaces?