ISharedPreferences.Edit 方法

定义

为这些首选项创建新的编辑器,通过该编辑器可以对首选项中的数据进行修改,并将这些更改以原子方式提交回 SharedPreferences 对象。

[Android.Runtime.Register("edit", "()Landroid/content/SharedPreferences$Editor;", "GetEditHandler:Android.Content.ISharedPreferencesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Content.ISharedPreferencesEditor? Edit ();
[<Android.Runtime.Register("edit", "()Landroid/content/SharedPreferences$Editor;", "GetEditHandler:Android.Content.ISharedPreferencesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Edit : unit -> Android.Content.ISharedPreferencesEditor

返回

返回接口的新实例 Editor ,允许修改此 SharedPreferences 对象中的值。

属性

注解

适用于 . 的 android.content.SharedPreferences.edit()Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于