• Api Documentation
Show / Hide Table of Contents
  • Ubiquity.NET.ArgValidators
    • ValidatedNotNullAttribute
    • Validators
      • ValidateDefined
      • ValidateLength
      • ValidateNotDefault
      • ValidateNotNull
      • ValidateNotNullOrWhiteSpace
      • ValidatePattern
      • ValidateRange

Method ValidateNotDefault

 

ValidateNotDefault<T>(T, String)

Verifies that a value is not equal to the default for the type.

Declaration
public static T ValidateNotDefault<T>(this T value, string paramName)

Parameters

T value

Value to test.

System.String paramName

Name of the parameter for the argument exception generated.

Returns

T

value for fluent design usage.

Type Parameters

T

Type of value to test for.

Exceptions

System.ArgumentNullException

value is the default value for value types or for reference types.

Back to top Copyright (C) 2017-2021, Ubiquity.NET Contributors
Build: 7.0.0