# Worksheet.Protection Property

> Worksheet.Protection property in the TX Sheet Control .NET API, with its syntax, its type Protection, a C# example and remarks on awaiting tasks and handles.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > Worksheet > Worksheet.Protection Property
- **539 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/protection-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/protection-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/protection-property/llms-full.txt

---

### Syntax

```csharp
public Protection Protection { get; }
```

### Property Value

`Protection`.

### Examples

Create the sample document data first, then use Worksheet.Protection. The returned value can be used by the calling report or application.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<Protection> UseWorksheetProtectionAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("B8").SetValueAsync(120);
    await sheet.Cell("B9").SetValueAsync(80);
    await sheet.Cell("B10").SetFormulaAsync("=SUM(B8:B9)");

    var worksheet = sheet;

    return worksheet.Protection;
}
```

### Remarks

Use the member with an instance or settings object from the documented package. Await task-returning operations. Document-bound handles must be resolved again after loading or deleting their owner.

### See Also

- [Worksheet Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/llms-full.txt)
- [Worksheet Protection](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/protection/llms-full.txt)
- [Protection Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/protection/llms-full.txt)

---

## Nearby

- **Previous:** [Worksheet.Print Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/print-property/llms-full.txt)
- **Next:** [Worksheet.Range Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/worksheet/range-method/llms-full.txt)
