Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.84 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Isolated Storage Setting issue
  2. var names = IsolatedStorageSettings.ApplicationSettings; // Here it showing an error that
  3.        
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Net;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Animation;
  14. using System.Windows.Shapes;
  15. using Microsoft.Phone.Controls;
  16. using System.IO.IsolatedStorage;
  17. using System.IO;
  18.  
  19. namespace IsolatedStorageSettings
  20. {
  21.     public partial class MainPage : PhoneApplicationPage
  22. {
  23.    // Constructor
  24.     public MainPage()
  25.     {
  26.         InitializeComponent();
  27.  
  28.         var names = IsolatedStorageSettings.ApplicationSettings;
  29.         names.Add("myName", "Developer John");
  30.  
  31.         displayText.Text = names["myName"].ToString();
  32.     }
  33. }
  34. }