frm.ShowDialog(); if (frm.DialogResult.HasValue && frm.DialogResult.Value) { // do something here }
DialogResult result = frm.ShowDialog(); if (result.HasValue && result.Value) { // do something here }
DialogResult
bool?
frm.ShowDialog(); if (frm.DialogResult.Equals(true)) { // do something here }
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
if (frm.ShowDialog() == true) { // do something here }
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.