Separate storage area

xiaoxiao2021-03-06  103

The stand-alone store is a partition located on the hard disk. Make sure that other applications cannot view your files.

Using system.io.IsolatedStorage;

IsolatedStorageFile isoStore = isolatedStorageFile.GetStore (isolatedStorageScope.assembly | isolatedStorageScope.user, null, null;

String fn = isostore.getFileNames ("a.txt");

IF (fn == null)

{

StreamWriter SW = New Streamwriter (IsolatedStorageFileStream ("a.txt"), filemode.createNew, isostore;

SW.WRITE ("Hello");

}

Else

{

StreamReader SR = IsolatedStorageFileStream ("a.txt"), FileMode.Open, isostore;

String s = sr.readline ();

}

转载请注明原文地址:https://www.9cbs.com/read-104100.html

New Post(0)