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

Attempts to get a Key-Value Coding compliant value from the given object using the given key. A Key-Value Coding compliant value is either a gettable property named identically to the key or a method named identically to the key (i.e., NOT getKey()) that returns a value. If the key doesn't exist, attempts to return valueForUndefinedKey() on the object, which by default throws an exception. Equivalent to -valueForKey: in Cocoa.

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

Syntax

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

Parameters

o
Type: System..::.Object
The base object.
key
Type: System..::.String
The key to get.

Return Value

The value for the specified key.

See Also