I am getting an error on this line:
ReceivedData = NetStream.Read(CryptData, 0, Size)
This is the information it gives me:
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.dll
Additional information: Specified argument was out of the range of valid values.
If you could help me understand why this is happening I would be very grateful, if you need more code or information just say.