写入文件(?隔离存储wp7)

时间:2012-04-05 08:34:46

标签: c# windows-phone-7

此代码用于将文本框的值写入文件,但即使我使用现有文件它仍然为空,它也不会创建文件!!

 private void button1_Click(object sender, RoutedEventArgs e)
 {
     string url =infooo.ur + txtb1.Text +  "/" + passtxx.Password + "/1/570322308ce1121cba1b93f5acc9ebd4733ef2bca90ef942a2cfa224f0aa08dc/1";
     client.DownloadStringAsync(new Uri(url));

     IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication();

     IsolatedStorageFileStream stream = iso.CreateFile("T11.txt");

     StreamWriter streamWrite = new StreamWriter(stream);

     streamWrite.Write(txtb1.Text);

     streamWrite.Close();

 }

1 个答案:

答案 0 :(得分:1)

要确保您的文件未保存,请尝试此列出您的隔离存储空间: http://wp7explorer.codeplex.com/