KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Okay, we know that the following two lines are equivalent - (0 == i) (i == 0) Also, the first method was encouraged in the past because that would have allowed the compiler to give an error message if you accidentally used '=' instead of '=='. My question is - in today's generation of pretty slick IDE's and intelligent compilers, do you still recommend the first method? In particular, this question popped into my mind when I saw the following code - if(DialogResult.OK == MessageBox.Show("Message")) ... In my opinion, I would never recommend the above. Any second opinions?
Tags (comma-separated)
Save Edits
Cancel