Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/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# 当存在多个独立存储文件夹时,无法获取文件_C#_Isolatedstorage - Fatal编程技术网

C# 当存在多个独立存储文件夹时,无法获取文件

C# 当存在多个独立存储文件夹时,无法获取文件,c#,isolatedstorage,C#,Isolatedstorage,我有2个独立的存储文件夹供我的管理员用户使用 在最上面的文件夹中,我有一个我想要抓取的文件。我使用下面的代码来计算独立存储的路径 var path = IsolatedStorageFile.GetUserStoreForAssembly().GetType().GetField("m_RootDir", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(IsolatedStorageFile.GetUserStoreForAss

我有2个独立的存储文件夹供我的管理员用户使用

在最上面的文件夹中,我有一个我想要抓取的文件。我使用下面的代码来计算独立存储的路径

var path = IsolatedStorageFile.GetUserStoreForAssembly().GetType().GetField("m_RootDir", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(IsolatedStorageFile.GetUserStoreForAssembly()).ToString()
现在,这将始终为我提供底部文件夹(上图)的路径,而我的文件位于顶部文件夹下


是否有其他方法获取路径?

使用反射获取文件不是一个好主意。
本文件可能有助于:
使用反射获取文件不是一个好主意。
本文件可能有助于: