NSUserDefaults.StandardUserDefaults Property

Definition

Contains the standard user defaults.

public static Foundation.NSUserDefaults StandardUserDefaults { [Foundation.Export("standardUserDefaults", ObjCRuntime.ArgumentSemantic.Strong)] get; }
member this.StandardUserDefaults : Foundation.NSUserDefaults

Property Value

The singleton object that represents the user’s standard defaults.

Attributes

Remarks

This NSUserDefaults instance contains all the loaded values from the various user settings and they are searched in order of precedence. In order of highest precedence to lower precedence, the contents of the NSUserDefaults are: the command line argument domain (NSArgumentDomain), the application specific domain, the global domain (NSGlobalDomain), the languages domain (based on the location settings), the general purpose fallback NSRegistrationDomain.

For each command line argument of the form -NAME VALUE that is passed at startup to your application, the "NAME" is used as the key, with the value set to VALUE. These are part of the NSArgumentDomain options.

// Retrieve the value for the command line argument -foo bar
var value = NSUserDefaults.StandardUserDefaults.StringForKey ("foo");

Applies to