Skip to content

Instantly share code, notes, and snippets.

@kijanawoodard
Created December 8, 2012 01:10
Show Gist options
  • Select an option

  • Save kijanawoodard/4237992 to your computer and use it in GitHub Desktop.

Select an option

Save kijanawoodard/4237992 to your computer and use it in GitHub Desktop.
var ok = s.HasValue();
if (ok) return;
//negative logic:
if (!string.IsNullOrWhiteSpace(s))
return;
//becomes:
if (s.HasValue())
return;
if (!foo.IsAlreadyUndone())
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment