Preferences.Set 方法

定义

重载

Set(String, Int64, String)

为给定键设置一个值。

Set(String, Int32, String)

为给定键设置一个值。

Set(String, Double, String)

为给定键设置一个值。

Set(String, DateTime, String)

为给定键设置一个值。

Set(String, Boolean, String)

为给定键设置一个值。

Set(String, String)

为给定键设置一个值。

Set(String, Double)

为给定键设置一个值。

Set(String, Int64)

为给定键设置一个值。

Set(String, Int32)

为给定键设置一个值。

Set(String, DateTime)

为给定键设置一个值。

Set(String, Boolean)

为给定键设置一个值。

Set(String, Single, String)

为给定键设置一个值。

Set(String, Single)

为给定键设置一个值。

Set(String, String, String)

为给定键设置一个值。

Set(String, Int64, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, long value, System::String ^ sharedName);
public static void Set (string key, long value, string? sharedName);
static member Set : string * int64 * string -> unit
Public Shared Sub Set (key As String, value As Long, sharedName As String)

参数

key
String

首选项键。

value
Int64

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, Int32, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, int value, System::String ^ sharedName);
public static void Set (string key, int value, string? sharedName);
static member Set : string * int * string -> unit
Public Shared Sub Set (key As String, value As Integer, sharedName As String)

参数

key
String

首选项键。

value
Int32

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, Double, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, double value, System::String ^ sharedName);
public static void Set (string key, double value, string? sharedName);
static member Set : string * double * string -> unit
Public Shared Sub Set (key As String, value As Double, sharedName As String)

参数

key
String

首选项键。

value
Double

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, DateTime, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, DateTime value, System::String ^ sharedName);
public static void Set (string key, DateTime value, string? sharedName);
static member Set : string * DateTime * string -> unit
Public Shared Sub Set (key As String, value As DateTime, sharedName As String)

参数

key
String

首选项键。

value
DateTime

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, Boolean, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, bool value, System::String ^ sharedName);
public static void Set (string key, bool value, string? sharedName);
static member Set : string * bool * string -> unit
Public Shared Sub Set (key As String, value As Boolean, sharedName As String)

参数

key
String

首选项键。

value
Boolean

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, System::String ^ value);
public static void Set (string key, string? value);
static member Set : string * string -> unit
Public Shared Sub Set (key As String, value As String)

参数

key
String

要为其设置值的键。

value
String

要设置的值。

适用于

Set(String, Double)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, double value);
public static void Set (string key, double value);
static member Set : string * double -> unit
Public Shared Sub Set (key As String, value As Double)

参数

key
String

首选项键。

value
Double

首选项值。

适用于

Set(String, Int64)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, long value);
public static void Set (string key, long value);
static member Set : string * int64 -> unit
Public Shared Sub Set (key As String, value As Long)

参数

key
String

首选项键。

value
Int64

首选项值。

适用于

Set(String, Int32)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, int value);
public static void Set (string key, int value);
static member Set : string * int -> unit
Public Shared Sub Set (key As String, value As Integer)

参数

key
String

首选项键。

value
Int32

首选项值。

适用于

Set(String, DateTime)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, DateTime value);
public static void Set (string key, DateTime value);
static member Set : string * DateTime -> unit
Public Shared Sub Set (key As String, value As DateTime)

参数

key
String

首选项键。

value
DateTime

首选项值。

适用于

Set(String, Boolean)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, bool value);
public static void Set (string key, bool value);
static member Set : string * bool -> unit
Public Shared Sub Set (key As String, value As Boolean)

参数

key
String

首选项键。

value
Boolean

首选项值。

适用于

Set(String, Single, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, float value, System::String ^ sharedName);
public static void Set (string key, float value, string? sharedName);
static member Set : string * single * string -> unit
Public Shared Sub Set (key As String, value As Single, sharedName As String)

参数

key
String

首选项键。

value
Single

首选项值。

sharedName
String

共享容器名称。

适用于

Set(String, Single)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, float value);
public static void Set (string key, float value);
static member Set : string * single -> unit
Public Shared Sub Set (key As String, value As Single)

参数

key
String

首选项键。

value
Single

首选项值。

适用于

Set(String, String, String)

Source:
Preferences.shared.cs
Source:
Preferences.shared.cs

为给定键设置一个值。

public:
 static void Set(System::String ^ key, System::String ^ value, System::String ^ sharedName);
public static void Set (string key, string? value, string? sharedName);
static member Set : string * string * string -> unit
Public Shared Sub Set (key As String, value As String, sharedName As String)

参数

key
String

首选项键。

value
String

首选项值。

sharedName
String

共享容器名称。

适用于