# Condition.ComparisonOperator Property

> Gets the operator that is used to compare the condition's form field value with the specified comparison value.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > Condition.ComparisonOperator Property
- **550 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/comparisonoperator-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/comparisonoperator-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/comparisonoperator-property/llms-full.txt

---

### Description

Gets the [operator](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/comparisonoperators-enumeration/llms-full.txt) that is used to compare the condition's [form field](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/formfield-property/llms-full.txt) value with the specified comparison value.

### Syntax

```csharp
public Condition.ComparisonOperators ComparisonOperator { get; }
```

```vbnet
Public ReadOnly Property ComparisonOperator As Condition.ComparisonOperators
```

### Examples

The following example builds a rule around an approval check box in a fillable form by using `Condition.ComparisonOperator`.

```csharp
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
Condition condition = new(approvalField, true);

Console.WriteLine($"Comparison Operator: {condition.ComparisonOperator}");
Console.WriteLine("Condition is ready for use.");
```

```vbnet
Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim condition As New Condition(approvalField, True)

Console.WriteLine($"Comparison Operator: {condition.ComparisonOperator}")
Console.WriteLine("Condition is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [Condition Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/llms-full.txt)
- **Next:** [Condition.ComparisonOperators Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/condition/comparisonoperators-enumeration/llms-full.txt)
