Silverlight 2.0 数据的独立存储(Isolated Storage):
IsolatedStorageFile - 操作 独立存储 的类
IsolatedStorageFile.GetUserStoreForSite() - 按站点获取用户的独立存储
IsolatedStorageFile.GetUserStoreForApplication() - 按应用程序获取用户的独立存储
IsolatedStorageSettings - 在独立存储中保存的 key-value 字典表
IsolatedStorageSettings.SiteSettings - 按站点保存的 key-value 字典表
IsolatedStorageSettings.ApplicationSettings - 按应用程序保存的 key-value 字典表
在线DEMO
http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html
示例
IsolatedStorage.xaml
IsolatedStorage.xaml.cs
演示 IsolatedStorageFile 的运行结果:
根目录下的目录列表:
Directory01
Directory02
根目录下的文件列表:
RootFile01.txt
__LocalSettings
目录 Directory01 下的目录列表:
SubDirectory01
目录 Directory01/SubDirectory01 下的*.txt文件列表:
File01.txt
File02.txt
文件 File01.txt 的内容:
我是:webabcd
我专注于asp.net, Silverlight
无法删除,目录不为空或不存在。
演示 IsolatedStorageSettings 的运行结果:
value
value2
0