I am new to C #. Could you tell me how to pass an interface as a parameter to a method?
that is, I want to access the members of the interface (property) and assign values to it and send this interface as a parameter to another method.
Say, for example, if I have an interface like IApple , which has members as the property int i and int j
I want to assign the values i and j and send the whole interface as a parameter, for example,
Method (IApple var);
Is it possible? Sorry, if I am not good at basic, please help me. thanks in advance
source
share