次の方法で共有


Preferences.Remove(String) Method

Definition

Removes the value associated with the specified key in this preference node, if any.

[Android.Runtime.Register("remove", "(Ljava/lang/String;)V", "GetRemove_Ljava_lang_String_Handler")]
public abstract void Remove (string? key);
[<Android.Runtime.Register("remove", "(Ljava/lang/String;)V", "GetRemove_Ljava_lang_String_Handler")>]
abstract member Remove : string -> unit

Parameters

key
String

key whose mapping is to be removed from the preference node.

Attributes

Exceptions

if the given key is null.

if this node has been removed.

Remarks

Removes the value associated with the specified key in this preference node, if any.

If this implementation supports stored defaults, and there is such a default for the specified preference, the stored default will be "exposed" by this call, in the sense that it will be returned by a succeeding call to get.

Java documentation for java.util.prefs.Preferences.remove(java.lang.String).

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