Hi,
I'm doing C# in uni and have a practical assignment. I've got everything else working except one line of codeand could totally do with some help.
Basically, I have to create 2 clients, 2 servers and 1 piece of middleware for a guessing game. I've got the guessing part sorted but the middle ware keeps throwing up the error
"NullReferenceException was unhandled:
An unhandled exception of type 'System.NullReferenceException' occurred in Middleware.exe
Additional information: Object reference not set to an instance of an object."
on this line of code
RemoteClient.BeginSend(echomessage, 0, echomessage.Length, SocketFlags.None, new AsyncCallback(OnDataSent), null);
As far as I know everyone else has the same line of code with no problems, any suggestions to what it could be would be much appreciated.
Thanks