Edit

Bagikan melalui


NSObject.ValueForKey(NSString) Method

Definition

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");
}

Applies to