5
有没有办法获得类实现的接口的类型。为了进一步解释这个问题,我的意思是。例如:返回类实现的接口类型C#
public interface ISomeInterface
{
}
public class SomeClass : ISomeInterface
{
}
public class SecondClass
{
ISomeInterface someclass;
public SecondClass()
{
someclass = new SomeClass();
}
public Type GetInterfaceInSomeWay()
{
//some code
}
}
我需要填写注释区域。预先感谢您的帮助,社区!
可能重复:http://stackoverflow.com/questions/26733/getting-all-types-that-implement-an-interface-with-c-sharp-3-0 – FSou1
@ FSou1我想这个问题是问这个问题的确切的相反 –
可能的重复[使用反射来查找接口实现](http://stackoverflow.com/questions/1519530/using-reflection-to-find-interfaces-实现) – nothrow