How do I get a list of all the properties of a class?
Try this:
var model = new MyObject(); foreach (var property in model.GetType().GetProperties()) { var descricao = property; var type = property.PropertyType.Name; }