# MisspelledWordCollection.GetItem Method

> Gets a particular item from the collection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 16.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 > MisspelledWordCollection.GetItem Method
- **1511 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordcollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordcollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordcollection/getitem-method/llms-full.txt

---

### Description

Gets a particular item from the collection.

### Syntax

#### GetItem()

Gets the misspelled word at the current text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the current input position and the end of the text, the first word is returned.

```csharp
public MisspelledWord GetItem();
```

```vbnet
Public Function GetItem() As MisspelledWord
```

#### GetItem(MisspelledWordKind)

Gets the misspelled word of the specified kind at the current text input position. If there is no misspelled word, the next possible word of is returned. If there is no misspelled word of the specified kind between the current input position and the end of the text, the first word of the specified kind is returned.

```csharp
public MisspelledWord GetItem(MisspelledWordKind kind);
```

```vbnet
Public Function GetItem(kind As MisspelledWordKind) As MisspelledWord
```

| Parameter | Description |
|---|---|
| kind | Specifies the word's kind. It must be one or more values of the [MisspelledWordKind](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordkind/enumeration/llms-full.txt) enumeration. |

#### GetItem(Point)

Gets the misspelled word at a certain geometrical location. If there is no misspelled word, null is returned.

```csharp
public MisspelledWord GetItem(Point location);
```

```vbnet
Public Function GetItem(location As Point) As MisspelledWord
```

| Parameter | Description |
|---|---|
| location | Specifies the word's location. The point must be specified in pixels with an origin at the top left corner of the control. If there is no misspelled word at the specified location, null is returned. |

#### GetItem(int)

Gets the misspelled word at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified input position and the end of the text, the first word is returned.

```csharp
public MisspelledWord GetItem(int textPosition);
```

```vbnet
Public Function GetItem(textPosition As Integer) As MisspelledWord
```

| Parameter | Description |
|---|---|
| textPosition | Specifies a zero-based text postion. The text positions in front of a word and behind a word belong to the word. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified text position and the end of the text, the first word is returned. |

#### GetItem(int, MisspelledWordKind)

Gets the misspelled word of the specified kind at the specified text input position. If there is no misspelled word, the next possible word is returned. If there is no misspelled word of the specified kind between the specified input position and the end of the text, the first word of the specified kind is returned.

```csharp
public MisspelledWord GetItem(int textPosition, MisspelledWordKind kind);
```

```vbnet
Public Function GetItem(textPosition As Integer, kind As MisspelledWordKind) As MisspelledWord
```

| Parameter | Description |
|---|---|
| textPosition | Specifies a zero-based text postion. The text positions in front of a word and behind a word belong to the word. If there is no misspelled word, the next possible word is returned. If there is no misspelled word between the specified text position and the end of the text, the first word is returned. |
| kind | Specifies the word's kind. It must be one or more values of the [MisspelledWordKind](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordkind/enumeration/llms-full.txt) enumeration. |

### Return Value

The return value is null, if a misspelled word could not be found. Otherwise, it is an object of the type MisspelledWord.

### Examples

The following example works with misspelled words in the current document by using `MisspelledWordCollection.get_Item`.

```csharp
MisspelledWordCollection misspelledWordCollection = textControl.MisspelledWords;

MisspelledWord result = misspelledWordCollection.GetItem(1, MisspelledWordKind.Normal);
result?.Select();
```

```vbnet
Dim misspelledWordCollection As MisspelledWordCollection = textControl.MisspelledWords

Dim result As MisspelledWord = misspelledWordCollection.GetItem(1, MisspelledWordKind.Normal)
If result IsNot Nothing Then result.Select()
```

---

## Nearby

- **Previous:** [MisspelledWordCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordcollection/getenumerator-method/llms-full.txt)
- **Next:** [MisspelledWordCollection.Ignore Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/misspelledwordcollection/ignore-method/llms-full.txt)
