# LanguageScopeCollection.GetItem Method

> Gets a particular item from the collection.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 5.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TXSpell.Core.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.Proofing > LanguageScopeCollection.GetItem Method
- **775 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/getitem-method/llms-full.txt

---

### Description

Gets a particular item from the collection.

### Syntax

#### GetItem(int)

Gets the [language scope](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt) at the specified text input position.

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

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

| Parameter | Description |
|---|---|
| textPosition | Specifies a zero-based text postion. |

#### GetItem(int, CultureInfo)

Gets the [language scope](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt) of the specified language at the specified text input position. If the [language scope's culture](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/language-property/llms-full.txt) at that position does not equal to the specified languge, the next corresponding scope is returned. If there is no language scope of the specified language between the specified input position and the end of the text, the first language scope of the specified kind is returned.

```csharp
public LanguageScope GetItem(int textPosition, CultureInfo language);
```

```vbnet
Public Function GetItem(textPosition As Integer, language As CultureInfo) As LanguageScope
```

| Parameter | Description |
|---|---|
| textPosition | Specifies a zero-based text postion. |
| language | Specifies the language to search for. |

### Return Value

The return value is null, if a language scope could not be found. Otherwise, it is an object of the type LanguageScope.

### Examples

The following example retrieves item from the language scope collection.

```csharp
var result = languageScopeCollection.GetItem(1, System.Globalization.CultureInfo.GetCultureInfo("en-US"));
Console.WriteLine($"Get Item result: {result}");
```

```vbnet
Dim result = languageScopeCollection.GetItem(1, System.Globalization.CultureInfo.GetCultureInfo("en-US"))
Console.WriteLine($"Get Item result: {result}")
```

---

## Nearby

- **Previous:** [LanguageScopeCollection Class](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/llms-full.txt)
- **Next:** [LanguageScopeCollection.Item Method](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/item-method/llms-full.txt)
