Click or drag to resize

throwIfThrowIfAbsurd Method (Int64, String, Boolean, Boolean, Boolean)

Throw a ArgumentNullException if a long is not positive.

Namespace:  WhetStone.SystemExtensions
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static void ThrowIfAbsurd(
	this long this,
	string paramName = "parameter",
	bool allowZero = true,
	bool allowOne = true,
	bool allowNeg = false
)

Parameters

this
Type: SystemInt64
The double to check.
paramName (Optional)
Type: SystemString
The string of the exception to throw. for generic parameter name.
allowZero (Optional)
Type: SystemBoolean
Whether to allow 0.
allowOne (Optional)
Type: SystemBoolean
Whether to allow 1.
allowNeg (Optional)
Type: SystemBoolean
Whether to allow negative values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Int64. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also