mardi 10 mai 2016

get all Properties with Values of complex Object

public class class1
    {
        public string Name1 { get; set; }
        public int ID1 { get; set; }
    }

    public class class2
    {
        public string Name2 { get; set; }
        public int ID2 { get; set; }
    }


    public class MyClass
    {
        public MyClass()
        {
            c2 = new List<class2>();
        }

        public string Name0 { get; set; }
        public int ID0 { get; set; }
        public class1 c1 { get; set; }
        public List<class2> c2 { get; set; }
    }

Hi, i want to get all Properties and values from MyClass Object with reflection.

thx





Aucun commentaire:

Enregistrer un commentaire