I have class MyModel and some object of MyModel.
I need for-loop or foreach properties of object without reflection. How implemented?
Class example:
public class MyModel
{
public string Level1_TypeName { get; set; }
public string Level1_AttrType { get; set; }
public string Level1_AttrValue { get; set; }
public string Level2_TypeName { get; set; }
public string Level2_AttrType { get; set; }
public string Level2_AttrValue { get; set; }
public string Level3_TypeName { get; set; }
public string Level3_AttrType { get; set; }
public string Level3_AttrValue { get; set; }
public string Level4_TypeName { get; set; }
public string Level4_AttrType { get; set; }
public string Level4_AttrValue { get; set; }
public string Level5_TypeName { get; set; }
public string Level5_AttrType { get; set; }
public string Level5_AttrValue { get; set; }
public string Level6_TypeName { get; set; }
}