KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Imagine the following code: void DoThis() { if (!isValid) return; DoThat(); } void DoThat() { Console.WriteLine("DoThat()"); } Is it OK to use a return inside a void method? Does it have any performance penalty? Or it would be better to write a code like this: void DoThis() { if (isValid) { DoThat(); } }
Tags (comma-separated)
Save Edits
Cancel