//写
using (FileStream fs = File.Create(filename))
{
byte[] info = new UTF8Encoding(true).GetBytes("This is some text in the file.");
fs.Write(info, 0, info.Length);
}
//读
using (StreamReader sr = File.OpenText(filename))
{
string s = "";
while ((s = sr.ReadLine()) != null)
{
DisplayAlert("read", s, "");
}
}