public static void SendRequest(LoginEvent @event) { var jSend = JsonConvert.SerializeObject(@event, Formatting.Indented); byte[] data = Encoding.Unicode.GetBytes(jSend.ToString()); stream.Write(data, 0, data.Length); }
public static void SendRequest() { LoginEvent @event = new LoginEvent(loginToServer, passwordToServer); var LoginEvent = @event; string jSend = JsonConvert.SerializeObject(LoginEvent, Formatting.Indented); byte[] data = Encoding.Unicode.GetBytes(jSend.ToString()); stream.Write(data, 0, data.Length); }