我有一行代碼創建了一個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
我發佈了一個答案。 –