# ConditionalInstruction.Conditions Property

> Gets or sets an array of conditions, that represent the requirements that has to be fulfilled to execute the specified instructions. Each element of that array is linked by a logical connective connector with its previous element. Based on these relationships, in which the individual conditions relate to each other, it is evaluated whether the requirements to execute the instructions has been fulfilled.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl > ConditionalInstruction.Conditions Property
- **805 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/conditions-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/conditions-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/conditions-property/llms-full.txt

---

### Description

Gets or sets an array of [conditions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/condition/llms-full.txt), that represent the requirements that has to be fulfilled to execute the specified [instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/instructions-property/llms-full.txt). Each element of that array is linked by a [logical connective](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/condition/logicalconnective-property/llms-full.txt) connector with its previous element. Based on these relationships, in which the individual conditions relate to each other, it is evaluated whether the requirements to execute the instructions has been fulfilled.

### Syntax

```csharp
public Condition[] Conditions { get; set; }
```

```vbnet
Public Property Conditions As Condition()
```

### Examples

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

```csharp
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
ConditionalInstruction conditionalInstruction = new();

conditionalInstruction.Conditions = new Condition[] { new Condition(new TXTextControl.CheckFormField(true), true) };
if (conditionalInstruction.Conditions != null)
{
    Console.WriteLine("Conditional Instruction: Conditions is available.");
}
```

```vbnet
Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim conditionalInstruction As New ConditionalInstruction()

conditionalInstruction.Conditions = New Condition() { New Condition(New TXTextControl.CheckFormField(True), True) }
If conditionalInstruction.Conditions IsNot Nothing Then
    Console.WriteLine("Conditional Instruction: Conditions is available.")
End If
```

### Remarks

A `System.ArgumentException` is thrown if the set value is null, an empty array of [conditions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/condition/llms-full.txt) or at least one of the array elements is null.

---

## Nearby

- **Previous:** [ConditionalInstruction Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/llms-full.txt)
- **Next:** [ConditionalInstruction Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/constructor/llms-full.txt)
