Compartilhar via


IPreferenceDataStore.PutInt(String, Int32) Method

Definition

Set an int value to the data store.

[Android.Runtime.Register("putInt", "(Ljava/lang/String;I)V", "GetPutInt_Ljava_lang_String_IHandler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public virtual void PutInt (string? key, int value);
[<Android.Runtime.Register("putInt", "(Ljava/lang/String;I)V", "GetPutInt_Ljava_lang_String_IHandler:Android.Preferences.IPreferenceDataStore, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member PutInt : string * int -> unit
override this.PutInt : string * int -> unit

Parameters

key
String

The name of the preference to modify.

value
Int32

The new value for the preference.

Attributes

Remarks

Set an int value to the data store.

Once the value is set the data store is responsible for holding it.

Java documentation for android.preference.PreferenceDataStore.putInt(java.lang.String, int).

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