# ConditionalInstruction.Instructions Property

> Gets or sets an array of instructions that are executed when the specified conditions are 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.Instructions Property
- **850 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/instructions-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/instructions-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/instructions-property/llms-full.txt

---

### Description

Gets or sets an array of [instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/llms-full.txt) that are executed when the specified [conditions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/conditions-property/llms-full.txt) are fulfilled.

### Syntax

```csharp
public Instruction[] Instructions { get; set; }
```

```vbnet
Public Property Instructions As Instruction()
```

### Examples

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

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

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

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

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

### Remarks

A `System.ArgumentException` is thrown if the set value is null, an empty array of [instructions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/llms-full.txt), at least one of the array elements is null or the array contains an `Instruction` element, where its [InstructionType](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/instructiontype-property/llms-full.txt) property value is already set by another `Instruction` array element for the same [FormField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formfield/llms-full.txt), a `System.ArgumentException` is thrown.

---

## Nearby

- **Previous:** [ConditionalInstruction.Copy Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/copy-method/llms-full.txt)
- **Next:** [ConditionalInstruction.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/name-property/llms-full.txt)
