title: Beginreceive/Endreceive passing parameter
body: <p>I'm reading from the udp socket using the following code, which is working well. Now I need to pass the 'received' from recv back to the calling main. How can this be done.</p>
  
  <pre><code>   try
          {
            client.BeginReceive(new AsyncCallback(recv), client);
          }
  
  
     private static void recv(IAsyncResult res)
      {
  
          try
          {
              UdpClient c = (UdpClient)(res.AsyncState);
  
              IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 162);           
              byte[]  received = c.EndReceive(res, ref RemoteIpEndPoint);
              Console.WriteLine(ASCIIEncoding.ASCII.GetString(received));
  
              c.BeginReceive(new AsyncCallback(recv), c);
  
          }
  
          catch (Exception e)
          {
              Console.WriteLine(e);
  
          }
      }
  </code></pre>