Share via


Preferences.Set Method

Definition

Overloads

Set(String, Int32, String)

Sets a value for a given key.

Set(String, Double, String)

Sets a value for a given key.

Set(String, Int64, String)

Sets a value for a given key.

Set(String, DateTimeOffset, String)

Sets a value for a given key.

Set(String, DateTime, String)

Sets a value for a given key.

Set(String, Boolean, String)

Sets a value for a given key.

Set(String, String)

Sets a value for a given key.

Set(String, DateTimeOffset)

Sets a value for a given key.

Set(String, Int64)

Sets a value for a given key.

Set(String, Int32)

Sets a value for a given key.

Set(String, Double)

Sets a value for a given key.

Set(String, DateTime)

Sets a value for a given key.

Set(String, Boolean)

Sets a value for a given key.

Set(String, Single, String)

Sets a value for a given key.

Set(String, Single)

Sets a value for a given key.

Set(String, String, String)

Sets a value for a given key.

Set(String, Int32, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Int32

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, Double, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Double

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, Int64, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Int64

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, DateTimeOffset, String)

Source:
Preferences.shared.cs

Sets a value for a given key.

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

Parameters

key
String

The key to set the value for.

value
DateTimeOffset

Value to set.

sharedName
String

Shared container name.

Applies to

Set(String, DateTime, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
DateTime

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, Boolean, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Boolean

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, String)

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

Sets a value for a given key.

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)

Parameters

key
String

The key to set the value for.

value
String

Value to set.

Applies to

Set(String, DateTimeOffset)

Source:
Preferences.shared.cs

Sets a value for a given key.

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

Parameters

key
String

The key to set the value for.

value
DateTimeOffset

Value to set.

Applies to

Set(String, Int64)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Int64

Preference value.

Applies to

Set(String, Int32)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Int32

Preference value.

Applies to

Set(String, Double)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Double

Preference value.

Applies to

Set(String, DateTime)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
DateTime

Preference value.

Applies to

Set(String, Boolean)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Boolean

Preference value.

Applies to

Set(String, Single, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Single

Preference value.

sharedName
String

Shared container name.

Applies to

Set(String, Single)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
Single

Preference value.

Applies to

Set(String, String, String)

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

Sets a value for a given key.

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)

Parameters

key
String

Preference key.

value
String

Preference value.

sharedName
String

Shared container name.

Applies to