Share via


ObjectPath.GetPathValue Method

Definition

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

T

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

T

value or default(T).

Applies to