Writing To Isolated Storage : IsolatedStorage « File Directory Stream « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Text;


    public class Tester
    {
        public static void Main()
        {
            IsolatedStorageFileStream configFile =new IsolatedStorageFileStream("Tester.cfg", FileMode.Create);
            StreamWriter writer = new StreamWriter(configFile);
            String output;
            System.DateTime currentTime = System.DateTime.Now;
            output = "Last access: " + currentTime.ToString();
            writer.WriteLine(output);
            output = "Last position = 27,35";
            writer.WriteLine(output);
            writer.Close();
            configFile.Close();
        }
    }








15.38.IsolatedStorage
15.38.1.Save file to Isolated Storage File
15.38.2.Create Directory in your Isolated Storage File
15.38.3.Get included files in your Isolated Storage File
15.38.4.Write text out To IsoStorage
15.38.5.Read from IsolatedStorage
15.38.6.Read text in From IsoStorage
15.38.7.Open up isolated storage based on identity of user + assembly evidence
15.38.8.Writing To Isolated Storage
15.38.9.Get IsolatedStorageFile for current user
15.38.10.Read and write with IsolatedStorageFileStream