API

GetRequiredService

Resolves a required service or throws when it is unavailable.

Formal Syntax & Structure

csharp syntaxcsharp
provider.GetRequiredService<Report>()

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.provider.GetRequiredService<Report>()
C# & .NET Reference