# SpellCheckDialogClosingEventArgs.CloseReason Property

> Gets a value that indicates the reason of the closing.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 3.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.SDK` (assembly `TXSpell.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.Windows.Forms.dll` from the setup
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > SpellCheckDialogClosingEventArgs.CloseReason Property
- **305 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/closereason-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/closereason-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/closereason-property/llms-full.txt

---

### Description

Gets a value that indicates the reason of the closing.

### Syntax

```csharp
public CloseReason CloseReason { get; }
```

```vbnet
Public ReadOnly Property CloseReason As CloseReason
```

### Examples

The following example includes the close reason value in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Close Reason: {spellCheckDialogClosingEventArgs.CloseReason}");
Console.WriteLine("Spell Check Dialog Closing Event Args is ready for use.");
```

```vbnet
Console.WriteLine($"Close Reason: {spellCheckDialogClosingEventArgs.CloseReason}")
Console.WriteLine("Spell Check Dialog Closing Event Args is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [SpellCheckDialogClosingEventArgs.Cancel Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/cancel-property/llms-full.txt)
- **Next:** [SpellCheckDialogClosingEventArgs.StateManager Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellcheckdialogclosingeventargs/statemanager-property/llms-full.txt)
