File.ReadLine() не выводит первую строку файла - C#
Формулировка задачи:
Листинг программы
- // Read the file and display it line by line.
- StreamReader file = new StreamReader(fileName, Encoding.Default);
- while ( !file.EndOfStream )
- {
- if ( file.ReadLine().StartsWith(name) & hands != null )
- {
- MessageBox.Show(file.ReadLine());
- pokerStarsLogic(hands);
- MessageBox.Show(hands);
- hands.Remove(0);
- }
- hands += file.ReadLine();
- }
- file.Close();
- }
Листинг программы
- // Read the file and display it line by line.
- StreamReader file = new StreamReader(fileName, Encoding.Default);
- while ( !file.EndOfStream )
- {
- if ( file.ReadLine().StartsWith(name) )
- {
- MessageBox.Show(file.ReadLine());
- pokerStarsLogic(hands);
- MessageBox.Show(hands);
- if ( hands != null ) hands.Remove(0);
- }
- hands += file.ReadLine();
- }
- file.Close();
- }
Решение задачи: «File.ReadLine() не выводит первую строку файла»
textual
Листинг программы
- if ( file.ReadLine()
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д