I have the following method:
public bool ConnectAsync() { if (IsConnected) throw new InvalidOperationException(\"Socket is already connected\");
The Expression window you have in the debugger is the one triggering the exception, not your code. Remove expressions (or watch) and it should work as expected.