Is there a reason I shouldn't be testing a set of variables for 0 by testing their product?
Often in my coding across different languages I will test a set of variables to do something if they all consist of zeros.
For example (c#):
if( myString.Length * myInt * (myUrl.LastIndexOf(@"\")+1) == 0 )
Instead of:
if( myString.Length == 0 || myInt == 0 || myUrl.LastIndexOf(@"\") < 0)
Is there a reason I shouldn't be testing this way?