C# 隔离存储设置的多个实例?
我正在寻找使用C#在Win Phone 8中存储数据的方法 首先,是否可以创建多个IsolatedStorageSettings实例 例如,下面的代码将构成两组独立的设置:C# 隔离存储设置的多个实例?,c#,windows-phone-8,isolatedstorage,application-settings,isolatedstoragefile,C#,Windows Phone 8,Isolatedstorage,Application Settings,Isolatedstoragefile,我正在寻找使用C#在Win Phone 8中存储数据的方法 首先,是否可以创建多个IsolatedStorageSettings实例 例如,下面的代码将构成两组独立的设置: IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; IsolatedStorageSettings settings2 = IsolatedStorageSettings.ApplicationSettings; 其
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
IsolatedStorageSettings settings2 = IsolatedStorageSettings.ApplicationSettings;
其次,我查看了隔离的存储文件,但在下面的代码中出现了错误。可能是我正在使用的示例跳过了一些步骤
IsolatedStorageFile isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
错误:
- “System.IO.IsolatedStorage.IsolatedStorage文件”不包含 “GetStore”的定义
- 当前上下文中不存在名称“IsolatedStorageScope”
- 当前上下文中不存在名称“IsolatedStorageScope”
隔离存储设置的实例
对于IsolatedStorageFiles
,msdn页面上有一个非常全面的示例来处理它