# selection

> Retrieves this TextElement's ITextSelection

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
[CreateProperty(ReadOnly = true)]
public ITextSelection selection { get; }
```
