title: port.ReadLine() - Not update
body: <p>I really need your help.</p>
  
  <p>I am building a project with an Arduino Uno and some magnetic sensors. I want the result output of the sensors to be printed and then to read it on my asp.net project (Visual Studio).</p>
  
  <p>I am using <code>Serial.print</code> and <code>Serial.println</code> to print the string and <code>port.ReadLine()</code> to read the string.</p>
  
  <p>The problem is that when I read the string it does not update like it should be (on the Serial monitor in Arduino I can see that it's updating well).</p>
  
  <p>When I am trying to change the ReadLine to Read it's not working either.</p>
  
  <p><a href="https://i.stack.imgur.com/TCPbZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TCPbZ.png" alt="Serial monitor"></a></p>
  
  <p><a href="https://i.stack.imgur.com/q5wfo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q5wfo.png" alt="enter image description here"></a></p>
  
  <p>"data_arduino" is not getting updated.</p>
  
  <p>Can you help me?</p>
  
  <p>This is the full Visual code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.IO.Ports;
  using System.Threading.Tasks;
  
  namespace ConsoleApp2 {
      class Program {
          static void Main(string[] args) {
              SerialPort port = new SerialPort();
              port.BaudRate = 9600;
              port.PortName = "COM3";
              port.DtrEnable = true;
              port.Open();
              bool status1 = true;
              bool status2 = true;
              bool status3 = true;
              char[] arr = new char[4];
              while (true) {
                  String data_arduino = port.ReadLine();
                  for (int i = 0; i &lt; arr.Length; i++) {
                      char first = data_arduino[i];
                      arr[i] = first;
                  }
                  int space = arr[0] - 48;
                  if (arr[1] == 48)
                      status1 = false;
                  if (arr[2] == 48)
                      status2 = false;
                  if (arr[3] == 48)
                      status3 = false;
              }
          }
      }
  }
  </code></pre>