所以我想用这段代码创建一个简单的文本文件。但是当我打开创建的文件时,文本并没有完全显示,我得到的唯一文本来自 tb1.text (id[2])。
这里有什么问题吗?
private async void Save_Reg()
{
var myfile = (tb3.Text+".xml");
var folderUsed = ApplicationData.Current.LocalFolder;
var folderOp = Windows.Storage.CreationCollisionOption.ReplaceExisting;
var createFile = await folderUsed.CreateFileAsync(myfile, folderOp);
var password = tb2.Text;
var recov = tb1.Text;
string[] id = { myfile,password, recov };
await Windows.Storage.FileIO.WriteTextAsync(createFile, id[0]);
await Windows.Storage.FileIO.WriteTextAsync(createFile, id[1]);
await Windows.Storage.FileIO.WriteTextAsync(createFile, id[2]);
}