How to get a property value based on the name

return car.GetType().GetProperty(propertyName).GetValue(car, null);

Leave a Comment