我有一行代码创建了一个IsolatedStorageFile
对象。当可执行文件移动到另一个文件夹时,IsolatedStorage丢失
IsolatedStorageFile isoFile = IsolatedStorageFile.GetStore(
IsolatedStorageScope.Roaming
| IsolatedStorageScope.User
| IsolatedStorageScope.Assembly,
null, null);
它的伟大工程和执行之间仍然存在数据我想它,但是当我提出我的exe
到不同的文件夹,它不接收相同的存储位置。我可以将exe
移回原始文件夹,并且所有数据都可以再次使用。
如何初始化IsolatedStoreFile
,以便无论exe
位于哪个文件夹都始终获得相同的存储位置?
更新:在documentation此.GetStore
是指出
空让IsolatedStorage对象选择的证据。
显然,null
正在使用exe
的URL作为证据。
我该如何强制它使用别的东西?
这是我用来了解这个的文章:DeveloperFusion
你看过这篇文章吗? http://stackoverflow.com/questions/1112681/can-i-get-a-path-for-a-isolatedstorage-file-and-read-it-from-external-applicatio –
@Steve我没有,但我怎么用这个? – 4castle
我发布了一个答案。 –