Hi I am stuck with a reflection issue:
Lets say we have
public Wheel wheel;
public string type;
No i create a car with a wheel
Car car = new Car();
Car.wheel = new Wheel();
car.wheel.type = "Michellin";
No i want to access the wheel.type using reflection and all i have is the string "wheel.type"
This does not work:
string wheelType = (string) car.GetType().GetField("wheel.type").GetValue(car);
Granted this code seems cumbersome but its just for demonstration, the question is:
How do i retrieve a FieldInfo viden a field name as a string that includes dot notation?
View Complete Post