if (length * width * height > 1000000)
throw new
ArgumentException();
bool BoxTooBig = (length * width * height > 1000000);
if (BoxTooBig)
throw new
ArgumentException();
int MaxBoxSize = 1000000;
bool BoxTooBig = (length * width * height > MaxBoxSize);
if (BoxTooBig)
throw new
ArgumentException();
Here's a piece of code I found in a new application being developed...
if (dr["Flags"].ToString().Substring(17,1) == "C")
Clearly this application has dire need of some TLC but at least we could have...
const int
DocumentStatusOffset = 17;
const string
CompletedStatus = "C";
if (dr["Flags"].ToString().Substring(DocumentStatusOffset, 1) == CompletedStatus)
No comments:
Post a Comment