Write text out To IsoStorage in CSharp

Description

The following code shows how to write text out To IsoStorage.

Example


/* ww  w .  ja  va  2 s  .  c o m*/
using System;
using System.IO.IsolatedStorage;
using System.IO;

  class MainClass
  {
    static void Main(string[] args)
    {
      using (IsolatedStorageFile store =IsolatedStorageFile.GetUserStoreForAssembly())
      {
        using (IsolatedStorageFileStream isStream = new IsolatedStorageFileStream("MyData.txt",FileMode.OpenOrCreate, store))
        {
          using (StreamWriter sw = new StreamWriter(isStream))
          {
            sw.WriteLine("data.");
            sw.WriteLine("Cool?");
          }
        }
      }


    }
  }




















Home »
  C# Tutorial »
    IO »




File Attribute
File Security
Directory Attribute
Directory Recursive
Binary File
Text Field
Buffered IO
Create Copy Delete Move
CSV
Drive
File System Watcher
Isolated Storage
MemoryStream
Serialize
Zip