c# get object property value by name

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

Also in C#: