Search Results for

    Show / Hide Table of Contents

    Class StringGuards

    Guards for strings

    This class contains argument checks for strings.

    Inheritance
    Object
    StringGuards
    Namespace: O9d.Guard
    Assembly: O9d.Guard.dll
    Syntax
    public static class StringGuards : object

    Methods

    | Improve this Doc View Source

    NotNullOrWhiteSpace(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 value if it is not null, empty or whitespace

    Examples
    _name = name.NotNullOrWhiteSpace(nameof(name));
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX