Read from IsolatedStorage in CSharp

Description

The following code shows how to read from IsolatedStorage.

Example


// www.ja  va2s  .  c om
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Text;

    public class Tester
    {
        public static void Main()
        {
            Tester app = new Tester();
            app.Run();
        }

        private void Run()
        {
            IsolatedStorageFileStream configFile = new IsolatedStorageFileStream("Tester.cfg", FileMode.Open);
            StreamReader reader = new StreamReader(configFile);
            string theEntry;
            do
            {
                theEntry = reader.ReadLine();
                Console.WriteLine(theEntry);
            } while (theEntry != null);

            reader.Close();
            configFile.Close();
        }
    }




















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