Enums Enums
Enums Enums
DocFX + Singulink = ♥

Search Results for

    Method IsValid

    IsValid<T>(T)

    Uses the custom IEnumValidatorAttribute<T> if available to check if the value is valid, otherwise checks whether the value is defined for regular enumerations, or checks whether the value's flags are all defined for flags enumerations.

    Declaration
    public static bool IsValid<T>(this T value) where T : unmanaged, Enum
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    Remarks

    This method is equivalent to calling IsDefined<T>(T) on regular enumerations or AreFlagsDefined<T>(T) on flags enumerations that don't have custom validator attributes.

    © Singulink. All rights reserved.