ObjectPath.GetPathValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetPathValue<T>(Object, String) |
Get the value for a path relative to an object. |
GetPathValue<T>(Object, String, T) |
Get the value for a path relative to an object. |
GetPathValue<T>(Object, String)
Get the value for a path relative to an object.
public static T GetPathValue<T> (object obj, string path);
static member GetPathValue : obj * string -> 'T
Public Shared Function GetPathValue(Of T) (obj As Object, path As String) As T
Type Parameters
- T
type to return.
Parameters
- obj
- Object
object to start with.
- path
- String
path to evaluate.
Returns
value or default(T).
Applies to
GetPathValue<T>(Object, String, T)
Get the value for a path relative to an object.
public static T GetPathValue<T> (object obj, string path, T defaultValue);
static member GetPathValue : obj * string * 'T -> 'T
Public Shared Function GetPathValue(Of T) (obj As Object, path As String, defaultValue As T) As T
Type Parameters
- T
type to return.
Parameters
- obj
- Object
object to start with.
- path
- String
path to evaluate.
- defaultValue
- T
default value to use if any part of the path is missing.
Returns
value or default(T).