Click here to Skip to main content
13,351,954 members (87,899 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 18 Jun 2010

TIP: Handling WPF DialogResult with simplicity

, 18 Jun 2010
Rate this:
Please Sign up or sign in to vote.
Or even...if (frm.ShowDialog() == true){ // do something here}
Or even...

if (frm.ShowDialog() == true)
  // do something here


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Andrew Rissing
Software Developer (Senior)
United States United States
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.

So..If you're not moving forward, you're moving backwards.

You may also be interested in...


Comments and Discussions

GeneralIndeed you don't have to declare a variable to evaluate the ... Pin
Jaime Olivares5-Sep-10 23:16
memberJaime Olivares5-Sep-10 23:16 
GeneralWhy not "if (frm.ShowDialog())"? Pin
Simon Dufour19-Aug-10 4:22
memberSimon Dufour19-Aug-10 4:22 
GeneralYeah, I'm not a big fan of "if (a == true)", but at least it... Pin
Andrew Rissing29-Jun-10 4:38
memberAndrew Rissing29-Jun-10 4:38 
GeneralYeah, that would be equivalent to Equals(true), although it ... Pin
Jaime Olivares28-Jun-10 21:42
memberJaime Olivares28-Jun-10 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 18 Jun 2010
Article Copyright 2010 by Andrew Rissing
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid