0
で一度にテキストファイル一つのラインを読む私はOnNavigatedTo
関数にこのコードを追加:のWindows 8.1アプリケーション
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++;
}
しかし、私はこのエラーを取得しておいてください。
Cannot convert from 'string' to 'System.IO.Steam'
どのラインで...正確には? – kennyzx
System.IO.StreamReaderファイル=新しいSystem.IO.StreamReader(パス); – Nadim
コードはコンパイルされません。 'new System.IO.StreamReader()'の行は何ですか?間違って貼り付けたと思いますか? – kennyzx