ContainValueCondition Class
Represents a condition that formats only cells with value that satisfies the specified criteria.
public sealed class ContainValueCondition : ContainCondition
Public NotInheritable Class ContainValueCondition
Inherits ContainCondition
- Inheritance:
- System.ObjectContainValueCondition
Properties
Operator
Gets or sets the operator of this ContainValueCondition.
public ContainValueOperator Operator { get; set; }
Public Property Operator As ContainValueOperator
Property Value
The operator of this ContainValueCondition.
Value
Gets or sets the value of this ContainValueCondition.
Value can be either constant or formula.
If value is constant, then it cannot be null and value's type must be supported in Value (types supported in SupportsType(Type)).
If value is formula, then value type must be System.String and it must start with '='.
Property Value
- System.Object
The value of this ContainValueCondition.
Exceptions
- System.ArgumentNullException
Value is null.
- System.ArgumentException
Value's type is not supported.
Value2
Gets or sets the second value of this ContainValueCondition used with Between and NotBetween operators.
Value can be either constant or formula.
If value is constant, then it cannot be null and value's type must be supported in Value (types supported in SupportsType(Type)).
If value is formula, then value type must be System.String and it must start with '='.
Property Value
- System.Object
The second value of this ContainValueCondition used with Between and NotBetween operators.
Exceptions
- System.ArgumentNullException
Value is null and Operator is Between or NotBetween.
- System.ArgumentException
Value's type is not supported.
Methods
ToString()
Returns a System.String that represents this ContainValueCondition instance.
Returns
- System.String
A System.String that represents this ContainValueCondition instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Inherited Properties
ConditionType | Gets the Contain value. (Inherited from ContainCondition) |
ContainConditionType | Gets the ContainCondition type. (Inherited from ContainCondition) |
Rule | Gets the conditional formatting rule associated with this condition. (Inherited from FormatCondition) |
Style | Gets the actual formatting which will be applied to a cell if its value satisfies this ContainCondition. (Inherited from ContainCondition) |