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
  • 146,575
  • 32
  • 257
  • 321
MineSky
  • 97
  • 1
  • 11

0 Answers0