B
bz
Hi,
I have the following situation:
a class can be loaded dynamically, and an object can be created from
it (the class implements an interface I know).
The class can have one or several methods which are not defined by the
interface. I don't know their name, but I could know their signature
(for example such method receive a parameter of type UserProfile and
returns bool)
Also, my interface have a method that returns the name (as string) of
such method
For example I can have a code like this
string authMethod = myobject.GetAuthenticationMethod();
now I want to be able to call that method, with a code like this
UserProfile upf = new UserProfile(userID);
bool retValue = CallByName(myobject, authMethod, upf);
How can I do this?
Thanks
I have the following situation:
a class can be loaded dynamically, and an object can be created from
it (the class implements an interface I know).
The class can have one or several methods which are not defined by the
interface. I don't know their name, but I could know their signature
(for example such method receive a parameter of type UserProfile and
returns bool)
Also, my interface have a method that returns the name (as string) of
such method
For example I can have a code like this
string authMethod = myobject.GetAuthenticationMethod();
now I want to be able to call that method, with a code like this
UserProfile upf = new UserProfile(userID);
bool retValue = CallByName(myobject, authMethod, upf);
How can I do this?
Thanks