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-implemented ) – nothrow