title: C# Send information over TCP
body: <p><strong>I'm still learning C#, so don't yell at me for not doing anything right. Also, i know I should probably be using WPF, but in my current condition I need to use winForms.</strong></p>
  
  <p>Client:</p>
  
  <pre><code>public void sendData(String dataIn)
  {
      String IP = textBox1.Text;
      String Port = textBox2.Text;
      net.Send(dataIn, IP, Port);
  }
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>public string listenForData()
  {
      String dataOut = net.Listen();
      return dataOut;
  }
  </code></pre>
  
  <p>How do I create a method that takes a string and sends it to a server application. I know it has something to do with TCP sockets. I've looked but I don't understand any tutorials or videos i've found.</p>
  
  <blockquote>
    <p>Thanks in advance, Noah.</p>
  </blockquote>