 | GuardCondGetT Method |
Gets an
IGuardT's value only if it is not
.
Namespace:
WhetStone.Guard
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntaxpublic static T CondGet<T>(
this IGuard<T> this,
T defval = null
)
Parameters
- this
- Type: WhetStone.GuardIGuardT
The IGuardT whose value to set. - defval (Optional)
- Type: T
The value to return if this is .
Type Parameters
- T
- The type of the IGuardT.
Return Value
Type:
TThe value of
this or
defval if
this is
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IGuardT. 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