All Questions
1 question
9
votes
7
answers
8k
views
Checking if a method returns false: assign result to temporary variable, or put method invocation directly in conditional?
Is it a good practice to call a method that returns true or false values in an if statement?
Something like this:
private void VerifyAccount()
{
if (!ValidateCredentials(txtUser.Text, txtPassword....