public Form1() { InitializeComponent(); HandleItems h = new HandleItems(checkedListBox1); Directory.CreateDirectory(folder_path); var x = h.Deserialize(list1); if (x != null) { list1 = x; } Application.ApplicationExit += new EventHandler(this.OnApplicationExit); }