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,
Girish SapariyaPosted Nov 26, 2013, 5:09 AM
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 ArthanariPosted Nov 27, 2013, 3:38 AM