Meg*_*ind 2 c# oop reflection interface class
我有一个有很多属性的课程.他们中的大多数是自定义类型.我想得到所有这些属性,其接口类型相同.
Public class abc:IamLegend
{
few properties
}
public class def:IamLegend
{
few properties
}
public class on_which_iamworking
{
public abc propabc{ get; set; }
public def propdef{ get; set; }
public someothertype propother{ get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我想要一些能够返回propabc和propdef的东西.
我知道如何使用反射来做到这一点,但我正在寻找另一种方式.
我正在研究c#4.0
谢谢
归档时间: |
|
查看次数: |
320 次 |
最近记录: |