views:

38

answers:

1

WPF and Silverlight have a data binding model whereby I can provide a Binding with a Path which comprises a dot-notation of property accessors down from a DataContext to a specific value inside a complex object graph (eg. MyDataContext.RootProperty.SubProperty.Thing.Value)

I have a (non-UI) requirement to accept such a path expressed as a simple string, and to use reflection on an object which is (hopefully) of a type which exposes the right property getters and setters in order to read and/or write values to those properties.

Before I go off and start writing the parser and reflection code, is there a handy Framework 3.5 BCL class to help with this?

A: 

No, but I wrote an open-source one a while ago. It allows reading and writing, and also propogates INotifyPropertyChanged. It is not as powerful as WPF/Silverlight (e.g., no support for indexing).

Stephen Cleary