Interface
I have an interface that interface have one method for example void
Add(). I implemented that void Add() method in 100 class then I would
like to Change the method in Interface void add() into int Add(). So I
Could not change int add() method in 100 class.without changing int
add() method in 100 class.How to resolve this scenario. AnyOne Could You please
guide me ?. Advance Thanks,
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Girish Sapariya159 reputationPosted Nov 26, 2013, 12:09 AM EST
An interface contains only the signatures of methods, properties, events or indexers. A class that implements the interface must implement the members of the interface that are specified in the interface definition.
So if you change the return type of a function in the Interface, you will have to change it in the respective classes where interface has been implemented or else it will give error: "'ClassName' does not implement interface member FunctionName()".
lingaraj Arthanari3 reputationPosted Nov 26, 2013, 10:38 PM EST