NSObject.ValueForKey(NSString) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the value of the property associated with the specified key.
[Foundation.Export("valueForKey:")]
public virtual Foundation.NSObject ValueForKey (Foundation.NSString key);
abstract member ValueForKey : Foundation.NSString -> Foundation.NSObject
override this.ValueForKey : Foundation.NSString -> Foundation.NSObject
Parameters
- key
- NSString
Name of the Objective-C property whose value you want to retrieve. It must be an ASCII name, start with a lowercase letter and contain no spaces.
Returns
An NSObject containing the value.
- Attributes
Remarks
string GetName (NSObject myObject)
{
return (string) myObject.ValueForKey ("name");
}