< I edit my question to be clear for everyone >
I have this Model/Class
public class Address
{
public string address{ get; set; }
public string city { get; set; }
public string state { get; set; }
public string code { get; set; }
}
I needing a List< String > that contains every property of 'Address', for example:
"address", "city", "state", "code"...
I already tried with Reflection but I've failed, it is returning properties of "LIST" not from my Model/Class
PropertyInfo[] propList = Address.GetType().GetProperties();
foreach (PropertyInfo prop in propList)
{
object propValue = prop.GetValue(propertyValue, null);
....
it is returning the following properties:
"Capacity", "Count", "Item[Int32]"