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
}