Assembly:/n: Tizen.Applications.Preference.dll<\/p>\n<p>The Preference class provides methods to store and retrieve application specific data\/preferences. Preferences are stored in the form of key-value pairs.\nKey names must be text strings while values can be integers, doubles, strings, or booleans.<\/p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">class<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Preference<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<p>Inheritance\n: object<\/p>\n<p>Preference<\/p>\n<h2 id=\"content-properties\"><a href=https://samsungtizenos.com/"#content-properties\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Properties<\/h2>\n<p><a href=https://samsungtizenos.com/"https:////github.com//Samsung//TizenFX//blob//main//src//Tizen.Applications.Preference//Tizen.Applications//Preference.cs//#L68\">View Source<\/a><\/p>\n<h4 id=\"content-keys\"><a href=https://samsungtizenos.com/"#content-keys\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Keys<\/h4>\n<p>Retrieves all keys of the application preferences.<\/p>\n<h5 id=\"content-declaration\"><a href=https://samsungtizenos.com/"#content-declaration\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Declaration<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">IEnumerable<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\"><string><\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Keys<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">get<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">; }<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-property-value\"><a href=https://samsungtizenos.com/"#content-property-value\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Property Value<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>System.Collections.Generic.IEnumerable<T><string><\/td>\n<td>The list of keys.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-examples\"><a href=https://samsungtizenos.com/"#content-examples\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Examples<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Set<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#24292E;--shiki-dark:#9ECBFF\">"Option_enabled"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#24292E;--shiki-dark:#79B8FF\">true<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Set<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"Joe"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Set<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"default_volume"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">10<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Set<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"brightness"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"0.6"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">foreach<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">key<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">in<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Keys<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Console<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">WriteLine<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"key {0}"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">key<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h2 id=\"content-methods\"><a href=https://samsungtizenos.com/"#content-methods\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Methods<\/h2>\n<p><a href=https://samsungtizenos.com/"https:////github.com//Samsung//TizenFX//blob//main//src//Tizen.Applications.Preference//Tizen.Applications//Preference.cs//#L154\">View Source<\/a><\/p>\n<h4 id=\"content-containsstring\"><a href=https://samsungtizenos.com/"#content-containsstring\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Contains(string)<\/h4>\n<p>Checks whether the given key exists in the preference.<\/p>\n<h5 id=\"content-declaration-1\"><a href=https://samsungtizenos.com/"#content-declaration-1\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Declaration<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">bool<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Contains<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#D73A49;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#79B8FF\">key<\/span><span style=\"color:#D73A49;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-parameters\"><a href=https://samsungtizenos.com/"#content-parameters\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Parameters<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>string<\/td>\n<td>key<\/td>\n<td>The name of the key to check.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-returns\"><a href=https://samsungtizenos.com/"#content-returns\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Returns<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>bool<\/td>\n<td>True if the key exists in the preference, otherwise false.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-remarks\"><a href=https://samsungtizenos.com/"#content-remarks\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Remarks<\/h5>\n<p>This method checks if the specified key exists in the preferences. It returns true if the key exists, and false if not. The key argument should be a valid parameter. An ArgumentException will be thrown if the key is invalid. Additionally, an IOException may be thrown if the method fails due to an internal input\/output error.<\/p>\n<h5 id=\"content-examples-1\"><a href=https://samsungtizenos.com/"#content-examples-1\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Examples<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Set<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#24292E;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#24292E;--shiki-dark:#9ECBFF\">"Joe"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">bool<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">exists<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Contains<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">if<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> (<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">exists<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">value<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Get<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\"><<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">istring<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">><\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Console<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">WriteLine<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"user {0}"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">value<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-exceptions\"><a href=https://samsungtizenos.com/"#content-exceptions\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Exceptions<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Condition<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>System.ArgumentException<\/td>\n<td>Thrown if the key is an invalid parameter.<\/td>\n<\/tr>\n<tr>\n<td>System.IO.IOException<\/td>\n<td>Thrown when the method failed due to an internal I\/O error.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<p><a href=https://samsungtizenos.com/"https:////github.com//Samsung//TizenFX//blob//main//src//Tizen.Applications.Preference//Tizen.Applications//Preference.cs//#L240\">View Source<\/a><\/p>\n<h4 id=\"content-gettstring\"><a href=https://samsungtizenos.com/"#content-gettstring\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Get<T>(string)<\/h4>\n<p>Gets the value of a preference item with the specified key.\nNote that this is a generic method.<\/p>\n<h5 id=\"content-declaration-2\"><a href=https://samsungtizenos.com/"#content-declaration-2\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Declaration<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">T<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Get<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\"><<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">T<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">><\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">key<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-parameters-1\"><a href=https://samsungtizenos.com/"#content-parameters-1\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Parameters<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>string<\/td>\n<td>key<\/td>\n<td>The key of the preference.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-returns-1\"><a href=https://samsungtizenos.com/"#content-returns-1\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Returns<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>T<\/td>\n<td>The value of the preference item if it is of the specified generic type.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-type-parameters\"><a href=https://samsungtizenos.com/"#content-type-parameters\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Type Parameters<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>T<\/td>\n<td>The generic type to return.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-examples-2\"><a href=https://samsungtizenos.com/"#content-examples-2\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Examples<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">bool<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">exists<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">Contains<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#24292E;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">if<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> (<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">exists<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">value<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">=<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Get<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\"><string><\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"active_user"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Console<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">WriteLine<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">"user {0}"<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">value<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-exceptions-1\"><a href=https://samsungtizenos.com/"#content-exceptions-1\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Exceptions<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Condition<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>System.Collections.Generic.KeyNotFoundException<\/td>\n<td>Thrown if the key is not found.<\/td>\n<\/tr>\n<tr>\n<td>System.ArgumentException<\/td>\n<td>Thrown if the key is an invalid parameter.<\/td>\n<\/tr>\n<tr>\n<td>System.IO.IOException<\/td>\n<td>Thrown when the method failed due to an internal I\/O error.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<p><a href=https://samsungtizenos.com/"https:////github.com//Samsung//TizenFX//blob//main//src//Tizen.Applications.Preference//Tizen.Applications//Preference.cs//#L115\">View Source<\/a><\/p>\n<h4 id=\"content-geteventcontextstring\"><a href=https://samsungtizenos.com/"#content-geteventcontextstring\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>GetEventContext(string)<\/h4>\n<p>Gets the event context for the given key.<\/p>\n<h5 id=\"content-declaration-3\"><a href=https://samsungtizenos.com/"#content-declaration-3\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Declaration<\/h5>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8;\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">public<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">static<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">WeakReference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\"><<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">Preference<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">.<\/span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">EventContext<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">><\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">GetEventContext<\/span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">(<\/span><span style=\"color:#D73A49;--shiki-dark:#F97583\">string<\/span><span style=\"color:#D73A49;--shiki-dark:#E1E4E8\"> <\/span><span style=\"color:#D73A49;--shiki-dark:#79B8FF\">key<\/span><span style=\"color:#D73A49;--shiki-dark:#E1E4E8\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre>\n<h5 id=\"content-parameters-2\"><a href=https://samsungtizenos.com/"#content-parameters-2\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Parameters<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>string<\/td>\n<td>key<\/td>\n<td>The preference key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<h5 id=\"content-returns-2\"><a href=https://samsungtizenos.com/"#content-returns-2\" class=\"heading-permalink\" aria-hidden=\"true\" title=\"Permalink\">\u00b6<\/a>Returns<\/h5>\n<div class=\"overflow-auto grid table-fixed\" data-table-container=\"data-table-container\"><table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>System.WeakReference<T><<a href=https://samsungtizenos.com/"Tizen.Applications.Preference.md/">Preference/a>.EventContext/a>>/td>/n
We use cookies to ensure the proper functioning of our site, to remember your preferences (such as global messages and release notes), and to analyze traffic. You can change your preferences at any time.
Read our cookie & privacy policy