[This is preliminary documentation and is subject to change.]
Attempts to set a Key-Value Coding compliant value on the given object using the given key.
A Key-Value Coding compliant value is either a settable property named identically to the key
or a method named setKey()) that takes a single value.
If the key doesn't exist, attempts to set setValueForUndefinedKey() on the object, which
by default throws an exception. Equivalent to -setValue:forKey: in Cocoa.
Namespace:
KNKVCAssembly: KNKVC (in KNKVC.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public static void setValueForKey( this Object o, Object value, string key ) |
| Visual Basic (Declaration) |
|---|
<ExtensionAttribute> _ Public Shared Sub setValueForKey ( _ o As Object, _ value As Object, _ key As String _ ) |
| Visual C++ |
|---|
[ExtensionAttribute] public: static void setValueForKey( Object^ o, Object^ value, String^ key ) |
Parameters
- o
- Type: System..::.Object
The base object.
- value
- Type: System..::.Object
The value to set.
- key
- Type: System..::.String
The key to set.