[This is preliminary documentation and is subject to change.]

Attempts to get a value from the given key path of an object by recursively calling valueForKey until the end of the path or null is encountered. See valueForKey for more information. Equivalent to Cocoa's -valueForKeyPath:.

Namespace:  KNKVC
Assembly:  KNKVC (in KNKVC.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static Object valueForKeyPath(
	this Object o,
	string keyPath
)
Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Function valueForKeyPath ( _
	o As Object, _
	keyPath As String _
) As Object
Visual C++
[ExtensionAttribute]
public:
static Object^ valueForKeyPath(
	Object^ o, 
	String^ keyPath
)

Parameters

o
Type: System..::.Object
The base object.
keyPath
Type: System..::.String
The key path to retrieve, in the form key.key.property.

Return Value

The value at the end of the path, or null.

See Also