I want to get the propertyInfo by the path that look like this:
string path = "window.position.x";
Here an example:
PropertyInfo p = typeof(WindowManager).GetProperty(path);
the WindowManager has a property called "window", which has a property called "position" which again has the property "x".
Is there some way to achieve this? Unfortunatelly GetProperty doesn't work with such a path.
You can split your
pathand iterate through metadata. Try this code:Note that you should check
propertyon each iteration to make sure your path is validDemo