I need a function with the following signature:
System.Reflection.PropertyInfo getPropertyInfo(System.Type type, string NavigationPath)
or in VB:
Function GetPropertyInfo(Type As System.Type, NavigationPath As String) As System.Reflection.PropertyInfo
Usage:
Dim MyPropertyInfo As PropertyInfo = GetPropertyInfo(GetType(Order),"Customer.Address.State.Code")
Dim DisplayName As String = MyStringFunctions.FriendlyName(MyPropertyInfo.Name)
It uses period-delimited path navigation. I can't figure out how to harness the databinding framework to do this. First hurdle is it seems only to want to work with objects (not types), second hurdle is I couldn't even get it to work with objects outside of a control. I would think under the hood somewhere databinding deals with types and property types; it would have to!
Thanks!