Is there a way to know at runtime which Interfaces and which methods an object instance implements at any given time without explicitly asking for them in the .NET (C#) environment?
Is there a way to know at runtime which Interfaces and which methods an object instance implements at any given time without explicitly asking for them in the .NET (C#) environment?
Yes, it is possible and easy to get that information using Reflection. To get the Interfaces, you can do this:
Likewise for methods: