Format:
Recent snippets matching tags of IsolatedStorage
public partial class MyDataContext : System.Data.Linq.DataContext { public void OnCreated() { if (!this.DatabaseExists()) MoveDatabase("MyDatabase.sdf"); } public static void MoveDatabase(string name) {
240 Views
no comments
public void SaveData(string path, object data) { var _Store = IsolatedStorageFile.GetUserStoreForApplication(); using (var _Stream = new IsolatedStorageFileStream(path, FileMode.Create, _Store)) { var _Serializer = new XmlSerializer(data.GetType()); _Serializer.Serialize(_Stream, data); } }
171 Views
no comments
const string KEY = "MyUniqueKey"; private void SaveButton_Click(object sender, EventArgs e) { var _Store = IsolatedStorageFile.GetUserStoreForApplication(); using (var _Stream = new IsolatedStorageFileStream(KEY, FileMode.Create, _Store)) { var _Data = MyTextBox.Text; var _Serializer = new XmlSerializer(typeof(string));
69 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
