Class StringGuards
Guards for strings
This class contains argument checks for strings.
Namespace: O9d.Guard
Assembly: O9d.Guard.dll
Syntax
public static class StringGuards : object
Methods
| Improve this Doc View SourceNotNullOrWhiteSpace(String, Nullable<String>)
Values that the provided value
is not null, empty, or whitespace
Declaration
public static string NotNullOrWhiteSpace(this string value, string? name = null)
Parameters
Type | Name | Description |
---|---|---|
String | value | The value to validate |
Nullable<String> | name | The name of the argument |
Returns
Type | Description |
---|---|
String | The value of |
Examples
_name = name.NotNullOrWhiteSpace(nameof(name));