title: This operation is not allowed on Non-connected sockets
body: <p>Consider the following:</p>
  
  <pre><code>    public void Connect()
      {
          clientObject = new TcpClient();
          IPEndPoint ipEnd = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 90);
          centralForm.writeLog("Connecting to desired server", System.Drawing.Color.Gray, true);
          clientObject.Connect(ipEnd);
          if ((debug) &amp;&amp; (clientObject.Connected)) { Debug.Print("Connected"); }
  
          Send("0");
          clientObject.GetStream().BeginRead(new byte[] { 0 }, 0, 0, Read, null);
      }
  </code></pre>
  
  <p>I get the error stated above on the last line in this snippet of code. What have I done wrong? I have called Connect()... I've stared at this for ages and I genuinely have no idea what I have done wrong.</p>
  
  <p>Send Code:</p>
  
  <pre><code>    public void Send(string data)
      {
          using (StreamWriter w = new StreamWriter(clientObject.GetStream()))
          {
              w.WriteLine(data);
              w.Flush();
          }
      }
  </code></pre>