Confusing If Statement?

Posted by NetSide on Stack Overflow See other posts from Stack Overflow or by NetSide
Published on 2010-03-09T08:43:32Z Indexed on 2010/03/09 8:51 UTC
Read the original article Hit count: 129

Filed under:
|

I always use If statement (In C#) as (1. Alternative);

if (IsSuccessed == true)
{
   //
}

I know that there is no need to write "== true" as (2. Alternative));

if (IsSuccessed)
{
   //
}

But, I use it because it is more readable and cause no performance issue. Of course, this is my choice and I know many software developers prefer first alternative. What is the best usage, and Why?

© Stack Overflow or respective owner

Related posts about best-practices

Related posts about c#