8 Replies
My ReadLine is getting called first
after that i get the writeline
why is that
i dont see a reason to need async in here ?
seems my variables are empty when writeline is called
but they are fine after the readline
Im lost
doesnt help either
I don't see
WriteLine
happening before ReadLine
. The breakpoint on WriteLine
was clearly hit?
Where would that be?
Seems to me your file[i]
simply doesn't contain any data. So ok
will be empty after calling Split
.
Could you check that file[i]
actually contains a string that would result in the expected value for ok
but im getting data in writeline after the readline @SleepWellPupper
i dont understand why its getting populated/printed out only then
im also outputing data into a txt with sw.WriteLine(Regex.Replace(file[i].Trim(), @"\s+", ","));, and it is not blank
Is this a single file in a console application?
If so, I could take a look at it if you post a gist, repo or the file in here
try splitting your lines up into individuals variables so you can properly track the state of everything when you set a breakpoint
like what does file[i] even return, maybe follow the DRY principle instead of using file[i].Trim() multiple times
I am also unsure if you are meaning to use the bitwise & operator in your if statement or the logical && operator
Yeah the bitwise
&
is sketchy too