我正在用 WP7 编写我的第一个应用程序,但我对 IS 有一个奇怪的问题:
case "pn_s":
IsolatedStorageFile isoStorage = IsolatedStorageFile.GetUserStoreForApplication();
//IsolatedStorageFileStream isoStream = isoStorage.CreateFile("plan_zajec_pn.txt");
IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(("plan_zajec_pn.txt"), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None, isoStorage);
StreamWriter writer = new StreamWriter(isoStream);
string dane="";
for (int i = 0; i < 10; i++)
{
dane += godzina[i].Text;
dane += ";";
dane += przedmiot[i].Text;
dane += ";";
dane += sala[i].Text;
dane += ";";
}
writer.WriteLine(dane);
isoStream.Close();
break;
实际上它不起作用......我重新打开应用程序后创建文件但它是空的,我检查了“dane”并且它包含日期