In.ReadLine() sometimes skips chars in the beginning string and doesn’t work as would be expected Could this be caused because i have Win7 Pro x64 NET Framework 4.5.2
I use my program through the pipeline in cmd, and i just use ping as an example and test
Screenshot:
1. skipped the first character
2. skipped the first character and second
It happens with async. The method RunScript is async
while(true)
{
try
{
string _str = null;
if ((_str = Console.In.ReadLine()) != null) { if (_str != "") { RunScript(_str, pathScript); } } else { break; }
}
}
This works without the async method:
while(true)
{
try
{
string _str = null;
if ((_str = Console.In.ReadLine()) != null) { if (_str != "") { Console.WriteLine(_str); } } else { break; }
}
}