✅ Help
THe code needs the variable lines to equals 1 to work. When i make it equals to 1, it works. But when i read the line which should make it 1 (it even outputs 1) it doesnt work. why?
5 Replies
third line changes
first image works, second one doesnt
when i do console.writeline(lines) on the second image below the third line, it even prints out 1 too
why isnt it working?
The first one reads the number of lines in the file, prints that number to the console and then discards the number
You then set the number of lines to 1 regardless of what it actually is
The second one does the same thing except it prompts for a value instead of setting to 1 always
how does it discard the number?
how do i make it so it doesnt?
i mean how do i make it so it does the if statements cause it should be equal to 1
You can store the result of File.ReadAllLines in your lines variable instead of calling WriteLine
ooo i see ok ill try that
IT WORKS
ok thank you!