Is there any way to know at run time which Interfaces and which methods to implement an object instance at a given time without explicitly asking for them in the .NET (C #) environment?
Is there any way to know at run time which Interfaces and which methods to implement an object instance at a given time without explicitly asking for them in the .NET (C #) environment?
Yes, it is possible and easy to obtain that information using Reflection. To get the Interfaces, you can do this:
var interfaces = objeto.GetType().GetInterfaces();
Also for the methods:
var metodos = objeto.GetType().GetMethods();