Click here to Skip to main content
11,408,708 members (61,110 online)
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

TIP: Handling WPF DialogResult with simplicity

, 18 Jun 2010 CPOL
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.

Comments and Discussions

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

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

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

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