i have an interface like this example:
Interface IRequest{
List GetProfiles();
void SetProfile (Profile p);
}
Now, in s
You can achieve this in two ways:
//If you CAN access the instance
var instance = new YourClass(); //instance of class implementing the interface
var interfaces = instance.GetType().GetInterfaces();
//Otherwise get the type of the class
var classType = typeof(YourClass); //Get Type of the class implementing the interface
var interfaces = classType.GetInterfaces()
And then:
foreach(Type iface in interfaces)
{
var methods = iface.GetMethods();
foreach(MethodInfo method in methods)
{
var methodName = method.Name;
}
}