ObjectPath.GetPathValue Method

Definition

Overloads

Name Description
GetPathValue<T>(Object, String, Boolean)

Get the value for a path relative to an object.

GetPathValue<T>(Object, String, T, Boolean)

Get the value for a path relative to an object.

GetPathValue<T>(Object, String, Boolean)

Get the value for a path relative to an object.

public static T GetPathValue<T>(object obj, string path, bool set = false);
static member GetPathValue : obj * string * bool -> 'T
Public Shared Function GetPathValue(Of T) (obj As Object, path As String, Optional set As Boolean = false) As T

Type Parameters

T

type to return.

Parameters

obj
Object

object to start with.

path
String

path to evaluate.

set
Boolean

Set path value with result if true.

Returns

T

value or default(T).

Applies to

GetPathValue<T>(Object, String, T, Boolean)

Get the value for a path relative to an object.

public static T GetPathValue<T>(object obj, string path, T defaultValue, bool set = false);
static member GetPathValue : obj * string * 'T * bool -> 'T
Public Shared Function GetPathValue(Of T) (obj As Object, path As String, defaultValue As T, Optional set As Boolean = false) 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.

set
Boolean

Set path value with result if true.

Returns

T

value or default(T).

Applies to