Created
December 8, 2012 01:12
-
-
Save kijanawoodard/4238005 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace FizzBuzz | |
| { | |
| public class ExtensionsDemo | |
| { | |
| public static void TestString() | |
| { | |
| var s = "hello"; | |
| var ok = s.HasValue(); | |
| s = null; | |
| ok = s.HasValue(); | |
| } | |
| } | |
| public static class StringExtensionMethods | |
| { | |
| public static bool HasValue(this string value) | |
| { | |
| return !string.IsNullOrWhiteSpace(value); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment