0

I have tried following code:

imports system.io

imports system.io.isolatedstorage 

private sub Button_Click(sender as system.object, e as system.windows.routedeventargs) handles button1.click

dim isoStore As IsolatedStorageFile = isolatedstoragefile.getuserstoreforapplication
isostore.createfile("c:\test.txt")

end sub

when i run the code on windows phone emulator it shows exception "Operation not permitted on isolatedstoragefilestream"

4

1 回答 1

1

Windows Phone 不像 PC 操作系统,没有C:\ - 每个应用程序都有自己的包含区域,您可以在其中存储和访问文件,因此得名IsolatedStorage.

GeekChamp 有一个很棒IsolatedStorage的 C# 教程。

对于 VB.Net,以下代码示例应该可以帮助您入门IsolatedStorage

http://code.msdn.microsoft.com/wpapps/VBWP8ImageFromIsolatedStora-11071695

于 2013-08-10T15:36:10.280 回答