Save file to Isolated Storage File : IsolatedStorage : File Directory Stream C# Examples


C# Examples » File Directory Stream » IsolatedStorage »

 

Save file to Isolated Storage File









    
using  System;
using  System.IO;
using  System.IO.IsolatedStorage;

static  class  MainClass
{
        static  void  Main()
        {
                using  (IsolatedStorageFile  store  =  IsolatedStorageFile.GetUserStoreForAssembly())
                {
                        store.CreateDirectory("MyFolder");

                        using  (Stream  fs  =  new  IsolatedStorageFileStream("MyFile.txt",  FileMode.Create,  store))
                        {
                                StreamWriter  w  =  new  StreamWriter(fs);

                                w.WriteLine("Test");
                                w.Flush();
                        }
                }
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo File Directory Stream
» IsolatedStorage