public static void SetValue <T>(this IUserPreference pref, PrefKeys key, T value) { string strKey = key.ToString(); pref.SetValue(strKey, value); }
public static T GetValue <T>(this IUserPreference pref, PrefKeys key) { string strKey = key.ToString(); return(pref.GetValue <T>(strKey, (T)DefaultValues[key])); }