private void SectionChecker() { if (SelectedSection == null) { SaveSection(); } else { if (CurrentSection.Equals(SelectedSection)) { MessageBox.Show("Updated"); } else { UpdateSection(); } } SelectedSection = null; CurrentSection = null; SecView.Close(); }