0

Is there any ways to include codes which run even if the program forced to quit?

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    socket.Close();
    System.Environment.Exit(0);
}
Yuval Itzchakov
  • 141,979
  • 28
  • 246
  • 306
MineSky
  • 97
  • 1
  • 11

0 Answers0