In the create a custom logger example the function IDisposable BeginScope<TState>(TState state);
of the ILogger
interface is implemented as return default!;
with no explanation of what BeginScope
even is and why default!
is used.
I am specifically interested why the null forgiving operator !
was used here.
public IDisposable BeginScope<TState>(TState state) => default!;