Is there a way to get the type of an interface that a class implements. For further explanation of the problem here's what I mean. For example:
public interface ISomeInterface
{
}
public class SomeClass : ISomeInterface
{
}
public class SecondClass
{
ISomeInterface someclass;
public SecondClass()
{
someclass = new SomeClass();
}
public Type GetInterfaceInSomeWay()
{
//some code
}
}
I need to fill the commented area. Thanks in advance for your help, community!
typeof(SomeClass).GetInterfaces()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With