我将此代码添加到OnNavigatedTo
函数中:
int counter = 0;
string line;
string path = "Streams\\Usernames.txt";
// Read the file and display it line by line.
System.IO.StreamReader file =
new System.IO.StreamReader(path);
while ((line = file.ReadLine()) != null)
{
Lbx_Usernames.Items.Add(line);
counter++;
}
但我不断收到此错误:
无法从“字符串”转换为“System.IO.Steam”