title: Expected a method with IAsyncResult BeginSend
body: <p>Hi I'm trying to create a TAP wrapper. The ConnectTaskAsync is fine, however I'm having some difficulties with SendTaskAsync.</p>
  
  <pre><code>public static Task ConnectTaskAsync(this Socket socket, EndPoint endpoint)
          {
              return Task.Factory.FromAsync(socket.BeginConnect, socket.EndConnect, endpoint, null);
          }
  
      public static Task&lt;int&gt; SendTaskAsync(this Socket socket, byte[] buffer, int offset, int size, SocketFlags flags)
      {
          return Task&lt;int&gt;.Factory.FromAsync(socket.BeginSend, buffer, offset, size, flags, socket.EndSend, null);
      }
  </code></pre>
  
  <p>The error I'm getting is a red underline beneath <code>BeginSend</code> with the message Expected a method with IAsyncResult BeginSend</p>
  
  <p>Where did I go wrong?</p>