CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of IsolatedStorage
C#
public partial class MyDataContext : System.Data.Linq.DataContext
{
    public void OnCreated()
    {
        if (!this.DatabaseExists())
            MoveDatabase("MyDatabase.sdf");
    }
 
    public static void MoveDatabase(string name)
    {
by Jerry Nixon   November 10, 2011 @ 10:13am
240 Views
no comments
 
C#
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);
    }
}
by Jerry Nixon   November 07, 2011 @ 1:40pm
171 Views
no comments
 
C#
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));
by Jerry Nixon   November 01, 2011 @ 3:22pm
69 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate