Installation
Get started with SGuard in your .NET project.
Requirements
- .NET 8, 9, or 10 (the package targets
net8.0,net9.0andnet10.0) - An IDE or editor that supports your target framework (for example Visual Studio, Rider or VS Code)
Install via NuGet
Using .NET CLI
dotnet add package SGuard
Using Package Manager Console
Install-Package SGuard
Using Visual Studio
- Right-click on your project in Solution Explorer
- Select "Manage NuGet Packages"
- Search for "SGuard"
- Click "Install"
Verify Installation
After installation, verify that SGuard is available by adding this using statement to your code:
using SGuard;
You should now have access to ThrowIf and Is guard methods.
Next Steps
- Quick Start - Learn the basics with simple examples
- Why SGuard? - Understand what makes SGuard different
- Guard Methods - Explore available guard methods