Last active
April 28, 2021 23:12
-
-
Save MelbourneDeveloper/db514b8735e5a1714b3b820913bcbf74 to your computer and use it in GitHub Desktop.
String Validator Record
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
public record StringValidator | |
{ | |
public string InputString { get; } | |
public StringValidator(string inputString) | |
{ | |
if (string.IsNullOrEmpty(inputString)) throw new ArgumentNullException(nameof(inputString)); | |
InputString = inputString; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment