Ric*_*ard 3 c# silverlight windows-phone-7
我想调试IsolatedStorageFileStream生成的xml文件.我在哪里可以找到该文件?
物理位置是:
Windows 7/2008:
<SYSTEMDRIVE>\Users\<user>\Local Settings\Application Data\IsolatedStorage
Run Code Online (Sandbox Code Playgroud)
Windows XP,Windows Server 2003:
<SYSTEMDRIVE>\Documents and Settings\<user>\Application Data\IsolatedStorage
Run Code Online (Sandbox Code Playgroud)
程序化访问是(仅检查文件的存在,其他示例可从最后提供的链接获得):
const string ISOLATED_FILE_NAME = "MyIsolatedFile.txt";
IsolatedStorageFile isoStore =
IsolatedStorageFile.GetStore( IsolatedStorageScope.User
| IsolatedStorageScope.Assembly, null, null );
string[] fileNames = isoStore.GetFileNames( ISOLATED_FILE_NAME );
foreach ( string file in fileNames )
{
if ( file == ISOLATED_FILE_NAME )
{
Debug.WriteLine("The file already exists!");
}
}
Run Code Online (Sandbox Code Playgroud)
摘自:
http://www.codeproject.com/KB/dotnet/IsolatedStorage.aspx
| 归档时间: |
|
| 查看次数: |
4259 次 |
| 最近记录: |