Received data from uart in c#
<p>I have a problem in this code, the problem is how can I know that the port is busy
because now I am using delay for wait in reading the data from the sender and after reading this data from port, without this delay, I can't read the correct data. Here is my code: </p>

<pre><code>private void Port_DataReceived(object sender, SerialDataReceivedEventArgs e)
   {

       string result=null;
       //Thread.Sleep(10000);
       result = Port.ReadExisting();
       textBox1.Text = result;
       if (result == "RING") label1.Text = "Call";
       else label1.Text = "message";
   }
</code></pre>