-2
此代碼用於將文本框的值寫入文件,但即使在使用存在文件時它也不會創建文件,它仍然爲空!寫入文件(?獨立存儲wp7)
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();
}
任何異常長大的嗎? – 2012-04-05 08:36:33
沒有在這個代碼沒有例外:( – 2012-04-05 08:44:34
如果您在streamWrite.Write(txtb1.Text)打破;?線 - 是有文本框的值 – 2012-04-05 08:49:28