title: c# socket receive byte array length
body: <p>i'm trying to learn to use sockets in c# and i've a doubt, i'm using a code something like this: </p>
  
  <pre><code>byte[] data = new byte[64]; 
  int length = 0;
  length = sock.Receive(data);
  //more code...
  </code></pre>
  
  <p>So, the <code>byte[]</code> data is filled with the recived data and the left space in the array is filled with 0s, Is the <code>byte[]</code> allocated into memory completely (all 64bytes)? If it's so, is there a way to make the <code>byte[]</code> the same size as the actual sent data? </p>