Edit

Share via


NSObject.ValueForKey(NSString) Method

Definition

Returns the value of the property associated with the specified key.

C#
[Foundation.Export("valueForKey:")]
public virtual Foundation.NSObject ValueForKey(Foundation.NSString key);

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

C#
string GetName (NSObject myObject)
{
	return (string) myObject.ValueForKey ("name");
}

Applies to

Product Versions
Xamarin.Mac SDK 14