0

应在我的 windows phone 8 应用程序中导入学生列表。我做了一些研究并找到了例子,但它对我不起作用:

 IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();

if (store.FileExists("services.txt"))
{
    using (var stream = new IsolatedStorageFileStream("services.txt", FileMode.Open, store))
    {
        using (var fileReader = new StreamReader(stream))
        {
            result = fileReader.ReadToEnd();
        }
    }
}
string[] tmp = result.Split(new char[] { '\r', '\n', '.' });
foreach (string str in tmp)
{
    System.Diagnostics.Debug.WriteLine(str);
}
4

0 回答 0