Compartir a través de


Preferences.Keys Method

Definition

Returns all of the keys that have an associated value in this preference node.

[Android.Runtime.Register("keys", "()[Ljava/lang/String;", "GetKeysHandler")]
public abstract string[]? Keys ();
[<Android.Runtime.Register("keys", "()[Ljava/lang/String;", "GetKeysHandler")>]
abstract member Keys : unit -> string[]

Returns

String[]

an array of the keys that have an associated value in this preference node.

Attributes

Exceptions

if the backing store is unavailable or causes an operation failure.

if this node has been removed.

Remarks

Returns all of the keys that have an associated value in this preference node. (The returned array will be of size zero if this node has no preferences.)

If the implementation supports stored defaults and there are any such defaults at this node that have not been overridden, by explicit preferences, the defaults are returned in the array in addition to any explicit preferences.

Java documentation for java.util.prefs.Preferences.keys().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to