[]
        
(Showing Draft Content)

GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.op_LogicalNot

operator ! Operator

operator !(Variant)

Performs a logical negation on a Variant value if it is of boolean type, or a bitwise negation if it is of a numeric type.

Declaration
public static Variant operator !(Variant v)
Parameters
Type Name Description
Variant v

Variant to be inverted.

Returns
Type Description
Variant
<code>Variant.True</code> if the given variant is False, False otherwise for boolean varian type .

Bitwise 'not' for numeric variants (int, long, ulong, float, double, decimal) and for string which can be parsed as numeric.

Exceptions
Type Condition
InvalidVariantOperationException

Thrown if the Variant is of a non-numeric, non-boolean type that does not support negation, such as TimeSpan, Date, or Object.