private void LOG() { FileInfo fi = new FileInfo(textBoxFile9.Text); if (!fi.Exists) { richTextBoxStatus.Text = "File [" + fi.FullName + "] does not exist.\r\n"; return; } using (LOG log = new LOG(fi)) { log.CSSPDHIChanged += CSSPDHIChanged; log.ReadFile(); log.CSSPDHIChanged -= CSSPDHIChanged; } }