Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 4.0 如何获取用于访问windows phone7应用程序中的文件和文件夹的独立存储路径?_C# 4.0_Silverlight 4.0_Windows Phone 7.1 - Fatal编程技术网

C# 4.0 如何获取用于访问windows phone7应用程序中的文件和文件夹的独立存储路径?

C# 4.0 如何获取用于访问windows phone7应用程序中的文件和文件夹的独立存储路径?,c#-4.0,silverlight-4.0,windows-phone-7.1,C# 4.0,Silverlight 4.0,Windows Phone 7.1,在windows mobile 6应用程序中,我使用的代码类似于Path.GetDirectoryName(System.Reflection.Assembly.getExecutionGassembly().GetName().CodeBase) 获取应用程序路径 同样,在windows phone7应用程序中,如何获取独立存储路径以及如何访问我的应用程序中的文件和文件夹? 请给我一个开发我的应用程序的示例代码。看看这里: 只需使用IsolatedStorageFile.GetUserStor

在windows mobile 6应用程序中,我使用的代码类似于
Path.GetDirectoryName(System.Reflection.Assembly.getExecutionGassembly().GetName().CodeBase)

获取应用程序路径

同样,在windows phone7应用程序中,如何获取独立存储路径以及如何访问我的应用程序中的文件和文件夹?
请给我一个开发我的应用程序的示例代码。

看看这里:


只需使用
IsolatedStorageFile.GetUserStoreForApplication()
即可获得一个对象,该对象可以操作隔离存储中的文件和目录


看到这个例子,里面有很多示例代码。

你说得对,他可以使用“var store=IsolatedStorageFile.GetUserStoreForApplication()”这也是正确的解决方案。
isoStore.GetType.GetField("m_RootDir", Reflection.BindingFlags.NonPublic).GetValue(isoStore).ToString();
                                       ^ or Reflection.BindingFlags.Instance