# TextFieldCollectionBase Class

> The TextFieldCollectionBase class is the base class of the TextFieldCollection, HypertextLinkCollection, DocumentLinkCollection, PageNumberFieldCollection, ApplicationFieldCollection and FormFieldCollection classes. It implements their base functionality. The TextFieldCollectionBase class implements the IEnumerable and the ICollection interface.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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`
- **Derived:** `TXTextControl.ApplicationFieldCollection`, `TXTextControl.DocumentLinkCollection`, `TXTextControl.FormFieldCollection`, `TXTextControl.HypertextLinkCollection`, `TXTextControl.PageNumberFieldCollection`, `TXTextControl.TextFieldCollection`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > TextFieldCollectionBase Class
- **843 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/llms-full.txt

---

### Description

The TextFieldCollectionBase class is the base class of the [TextFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollection/llms-full.txt), [HypertextLinkCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/hypertextlinkcollection/llms-full.txt), [DocumentLinkCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentlinkcollection/llms-full.txt), [PageNumberFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagenumberfieldcollection/llms-full.txt), [ApplicationFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/llms-full.txt) and [FormFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfieldcollection/llms-full.txt) classes. It implements their base functionality. The TextFieldCollectionBase class implements the IEnumerable and the ICollection interface.

### Syntax

```csharp
public abstract class TextFieldCollectionBase : ICollection, IEnumerable
```

```vbnet
Public MustInherit Class TextFieldCollectionBase
    Implements ICollection, IEnumerable
```

### Examples

The following example includes the can add value from a Text Field Collection Base object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Can Add: {textFieldCollectionBase.CanAdd}");
Console.WriteLine("Text Field Collection Base is ready for use.");
```

```vbnet
Console.WriteLine($"Can Add: {textFieldCollectionBase.CanAdd}")
Console.WriteLine("Text Field Collection Base is ready for use.")
```

---

## In This Section

- [TextFieldCollectionBase.CanAdd Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/canadd-property/llms-full.txt): Gets a value indicating whether a new text field can be inserted at the current input position. It is true if a text field can be inserted, otherwise it is false. Text Control cannot insert a text field inside of another text field.
- [TextFieldCollectionBase.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/count-property/llms-full.txt): Gets the number of elements contained in the collection.
- [TextFieldCollectionBase.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/getenumerator-method/llms-full.txt): Returns an enumerator that can be used to iterate through the collection.
- [TextFieldCollectionBase.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/issynchronized-property/llms-full.txt): Returns true if the collection is designed to be thread safe, otherwise, it returns false.
- [TextFieldCollectionBase.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/syncroot-property/llms-full.txt): Gets an object that can be used to synchronize access to the collection.

---

## Nearby

- **Previous:** [TextFieldCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollection/remove-method/llms-full.txt)
- **Next:** [TextFieldCollectionBase.CanAdd Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textfieldcollectionbase/canadd-property/llms-full.txt)
