title: Help with understanding C# syntax while Invoking a new Action
body: <p>I am new to c# and do not understand the syntax of invoking a new action or even what an action is. From my understanding in Port1_DataReceived, I have to create an action because I am in a new tread... Can anyone elaborate on why I need to do this?  </p>
  
  <pre><code>public Form1()
  {
      InitializeComponent();
      SerialPort Port1 = new SerialPort("COM11", 57600, Parity.None, 8, StopBits.One);
      Port1.DataReceived += new SerialDataReceivedEventHandler(Port1_DataReceived);
      Port1.Open();
  }
  
  
  private void Port1_DataReceived(object sender, SerialDataReceivedEventArgs e)
  {
       SerialPort Port = (SerialPort)sender;
       string Line = "";
       int BytestoRead = Port.BytesToRead;
       Line = Port.ReadLine();
       label1.Invoke(new Action(() =&gt;
       {
            label1.Text = Line;
        }));
  }
  </code></pre>
  
  <p>The code snip that I am really having trouble understanding is:</p>
  
  <pre><code>label1.Invoke(new Action(() =&gt;
           {
                label1.Text = Line;
            }));
  </code></pre>
  
  <p>Can someone break down what this is doing.. I am sure it is nothing to complicated, just that I have never seen anything like it before. The syntax that is really holding me up is <code>()=&gt;</code> the new action is pointing to the code below or something?? </p>