小编use*_*553的帖子

System.Reflection - 如何调用次级类型的getter方法?

我有三节课:

public class TestA
{
    public string Str1 { get; set; }
    public string Str2 { get; set; }
    public TestB TestB { get; set; }

    public TestA()
    {
        Str1 = "string1";
        Str2 = "string2";
        TestB = new TestB();
    }
}

public class TestB
{
    public string Str3 { get; set; }
    public string Str4 { get; set; }
    public TestC ObjTestC { get; set; }
    public TestB()
    {
        Str3 = "string3";
        Str4 = "string4";
        ObjTestC = new TestC();
    } …
Run Code Online (Sandbox Code Playgroud)

.net c# reflection system.reflection

3
推荐指数
1
解决办法
4279
查看次数

标签 统计

.net ×1

c# ×1

reflection ×1

system.reflection ×1