Making sure something is really true.....
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
There is undoubtedly another DLL that inspects this DLL's IL to ensure the code has not been tampered with. If it finds that somebody removed the seemingly extraneous if statement, it will cause ThreadAbortExceptions at random intervals. ;P
[
S<T>::f(U) // Out of line.
](http://msdn.microsoft.com/en-us/library/8yk3t00s(v=vs.71).aspx)
-
There is undoubtedly another DLL that inspects this DLL's IL to ensure the code has not been tampered with. If it finds that somebody removed the seemingly extraneous if statement, it will cause ThreadAbortExceptions at random intervals. ;P
[
S<T>::f(U) // Out of line.
](http://msdn.microsoft.com/en-us/library/8yk3t00s(v=vs.71).aspx)
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
I am going to guess that one of those blocks should be setting randomValue = false. If so I would prefer this much simplier version: randomValue = status == "something"; However, when I see code like that I have to check everything around it for correct logic. :(
Just because the code works, it doesn't mean that it is good code.
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
I'll guess that this code has been significantly reorganized and these are the only statements left from a major cutback. Otherwise, we must assume that the author is insane.
-
saw this at work today.... if (Status == "something") { randomValue = true; } else { randomValue = true; } That was it. No other code in that if/else statement. :-D
there is an obvious flaw in this code, it should read like:
if (Status == "something")
{
randomValue = true;
}
else if (Status != "something")
{
randomValue = true;
}
else
{
randomValue = true;
}