Android.Content.Context.GetSharedPreferences Method
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values.

Syntax

[Android.Runtime.Register("getSharedPreferences", "(Ljava/lang/String;I)Landroid/content/SharedPreferences;", "GetGetSharedPreferences_Ljava_lang_String_IHandler")]
public abstract ISharedPreferences GetSharedPreferences (string name, [Android.Runtime.GeneratedEnum] FileCreationMode mode)

Parameters

name
Desired preferences file. If a preferences file by this name does not exist, it will be created when you retrieve an editor (SharedPreferences.edit()) and then commit changes (Editor.commit()).
mode
Operating mode. Use 0 or Context.MODE_PRIVATE for the default operation, Context.MODE_WORLD_READABLE and Context.MODE_WORLD_WRITEABLE to control permissions. The bit Context.MODE_MULTI_PROCESS can also be used if multiple processes are mutating the same SharedPreferences file. Context.MODE_MULTI_PROCESS is always on in apps targeting Gingerbread (Android 2.3) and below, and off by default in later versions.

Returns

Documentation for this section has not yet been entered.

Remarks

Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values. Only one instance of the SharedPreferences object is returned to any callers for the same name, meaning they will see each other's edits as soon as they are made.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1