Version

GetValue<T> Method (ReflectionHelper)

Returns a value of the specified type from the supplied object and string path to the desired value
Syntax
'Declaration
 
Public Shared Function GetValue(Of T)( _
   ByVal oSource As System.Object, _
   ByVal propString As System.String, _
   Optional ByVal tErrVal As T _
) As T
public static T GetValue<T>( 
   System.object oSource,
   System.string propString,
   T tErrVal
)
public: static T* GetValue<T>( 
   System.Object* oSource,
   System.string* propString,
   T* tErrVal
) 

Parameters

oSource
The root object that you will retrieve the value from
propString
A string input of the path of properties, fields, and methods to retrieve the value desired
tErrVal
The return value if there is an error in retrieving the value, defaults to the default of the defined type T.

Type Parameters

T
The defined type that you expect the value to be
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also