# TextFieldCollectionBase.GetEnumerator Method

> Returns an enumerator that can be used to iterate through the collection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **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 > TextFieldCollectionBase.GetEnumerator Method
- **299 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/getenumerator-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/getenumerator-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/getenumerator-method/llms-full.txt

---

### Description

Returns an enumerator that can be used to iterate through the collection.

### Syntax

```csharp
public TextFieldCollectionBase.TextFieldEnumerator GetEnumerator();
```

```vbnet
Public Function GetEnumerator() As TextFieldCollectionBase.TextFieldEnumerator
```

### Return Value

The return value is an IEnumerator that represents the collection.

### Examples

The following example retrieves enumerator from the text field collection base.

```csharp
var result = textFieldCollectionBase.GetEnumerator();
Console.WriteLine($"Get Enumerator result: {result}");
```

```vbnet
Dim result = textFieldCollectionBase.GetEnumerator()
Console.WriteLine($"Get Enumerator result: {result}")
```

---

## Nearby

- **Previous:** [TextFieldCollectionBase.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/count-property/llms-full.txt)
- **Next:** [TextFieldCollectionBase.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textfieldcollectionbase/issynchronized-property/llms-full.txt)
