как выполнить итерацию по внутренним свойствам в c #

public class TestClass
{
        public string property1 { get; set; }
        public string property2 { get; set; }

        internal string property3 { get; set; }
        internal string property4 { get; set; }
        internal string property5 { get; set; }
}

Я могу перебирать свойства с помощью следующего цикла, но он показывает только общедоступные свойства. Мне нужны все свойства.

foreach (PropertyInfo property in typeof(TestClass).GetProperties())
{
    //do something
}
26
задан Goran Obradovic 27 September 2011 в 21:00
поделиться