C# encoding.ascii.getstring problem
<p>in the snippet given below i get error in windows application form but same code works fine for console application. Do i have to make any consideration in that aspect?</p>

<p>Any idea would be appreciated.</p>

<pre><code> Byte[] bReceive = new Byte[1024]; 
int i = mySocket.Receive(bReceive, bReceive.Length, 0); 
//Convert Byte to String string 
sBuffer = Encoding.ASCII.GetString(bReceive);
</code></pre>

<p>This works fine in console application, but i am trying to run this code in forms based application now , but i get error that GETstring needs an argument. Could any one please show the right direction.</p>

<p>Thanks</p>
