我有一个foreach(Wall wall in WallsList)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine(string.Format("Name: {0}", wall.Name));
sb.AppendLine(string.Format("Width: {0}", wall.Width.ToString()));
sb.AppendLine(string.Format("Length: {0}", wall.Length.ToString()));
Debug.WriteLine(sb.ToString());
}
对象,我正在尝试读取一个字符串(用于调试目的)。最简单的方法是什么?
答案 0 :(得分:1)
在C#中:
string text = await Windows.Storage.FileIO.ReadTextAsync(storageFile);
在JavaScript中:
var text = Windows.Storage.FileIO.readTextAsync(storageFile).then(file => do_stuff(file))