It is necessary to read data from the COM port. It is usually recommended to use the ReadLine () method. However, on my device, this method often returns an empty string. I tried to use ReadExisting () in combination with Thread.Sleep () almost 100% positive result.
Thread.Sleep(100); var response = comPort.ReadExisting(); That's the question: where's the catch? Why everywhere and in the Internet, and in the literature, and MSDN including, recommend using ReadLine ()?