Last active
August 30, 2020 11:01
-
-
Save pmatthews05/6cda97738f526f9cd8c267267690d3b4 to your computer and use it in GitHub Desktop.
This file contains 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 CSharpLibrary | |
{ | |
public static class IntLibrary | |
{ | |
public static bool NumberGreaterThan5(this string value) | |
{ | |
Int32 intValue = 0; | |
bool canConvert = Int32.TryParse(value, out intValue); | |
if (canConvert) | |
{ | |
if (intValue > 5) | |
{ | |
return true; | |
} | |
} | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment