Example #1
0
        private void frmClient_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (client != null)
            {
                if (client.Connected)
                {
                    client.Disconnect();
                }

                client.Dispose();
            }
        }
Example #2
0
 private void frmClient_FormClosed(object sender, FormClosedEventArgs e)
 {
     client.Dispose();
 }