# ConditionalInstructionCollection Class

> An instance of the ConditionalInstructionCollection class contains all conditional instructions in a Text Control document or part of the document represented through objects of type ConditionalInstruction. An instance of this class can be obtained with the FormFieldCollection.ConditionalInstructions property. The ConditionalInstructionCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **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
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > ConditionalInstructionCollection Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/#members)

---

## In This Section

- [ConditionalInstructionCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/add-method/llms.txt): Inserts an instance of the class ConditionalInstruction to the collection and the document.
- [ConditionalInstructionCollection.Clear Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/clear-method/llms.txt): Removes all conditional instructions from the collection and the document.
- [ConditionalInstructionCollection.ConditionalInstructionNames Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/conditionalinstructionnames-property/llms.txt): Gets the names of all ConditionalInstruction elements that are listed inside the collection.
- [ConditionalInstructionCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/copyto-method/llms.txt): Copies the elements of the collection to an array, starting at a particular index.
- [ConditionalInstructionCollection.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/count-property/llms.txt): Gets the number of elements contained in the collection.
- [ConditionalInstructionCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/getenumerator-method/llms.txt): Returns an enumerator that can be used to iterate through the collection.
- [ConditionalInstructionCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/getitem-method/llms.txt): Gets that ConditionalInstruction element from the collection, where the Name property value equals the specified name.
- [ConditionalInstructionCollection.GetItems Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/getitems-method/llms.txt): Gets those ConditionalInstruction elements from the collection, where at least one Condition or Instruction element references the specified FormField.
- [ConditionalInstructionCollection.IsValueValid Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/isvaluevalid-method/llms.txt): Returns a value indicating whether the value of a specific form field is marked as valid. The corresponding validation is executed by the conditions of a conditional instruction and applied by an Instruction object, that marks the related form field as valid or invalid.
- [ConditionalInstructionCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/remove-method/llms.txt): Removes that ConditionalInstruction element from the collection and the document, where the Name property value equals the specified name.

---

## Nearby

- **Previous:** [ConditionalInstruction.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstruction/name-property/llms.txt)
- **Next:** [ConditionalInstructionCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/conditionalinstructioncollection/add-method/llms.txt)
