Isolated Storage File Stream form input and output
using System;
using System.IO;
using System.IO.IsolatedStorage;
class Utils
{
public static Stream GetSettingsReadStream()
{
IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForDomain();
IsolatedStorageFileStream stream = new IsolatedStorageFileStream("settings.bin", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite, file);
return stream;
}
public static Stream GetSettingsWriteStream()
{
IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForDomain();
IsolatedStorageFileStream stream = new IsolatedStorageFileStream("settings.bin", FileMode.OpenOrCreate, FileAccess.Write, FileShare.Read, file);
return stream;
}
}
Related examples in the same category