Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Guard
Guard Class
Guard Methods
CondGet(T) Method
CondMutate(T) Method
CondSet(T) Method
Guard
CondSet
T
Method
Sets an
IGuard
T
's value only if it is not
.
Namespace:
WhetStone.Guard
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
Copy
public
static
bool
CondSet
<T>(
this
IGuard
<T>
this
, T
val
)
Parameters
this
Type:
WhetStone.Guard
IGuard
T
The
IGuard
T
whose value to set.
val
Type:
T
The value to set the
this
to, if it is not
.
Type Parameters
T
The type of the
IGuard
T
.
Return Value
Type:
Boolean
Whether the value was set or not.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IGuard
T
. 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
Reference
Guard Class
WhetStone.Guard Namespace