KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Why wouldn't the following line of code work in a method? return (count > 0) ? true : false; It works perfectly fine if I do: bool ret = (count > 0) ? true : false; return ret; Bonus Question : Is it really faster or more effective than the standard if statement? bool ret = false; if(count > 0) ret = true; return ret; Which one would you recommend?
Tags (comma-separated)
Save Edits
Cancel