Skip to content

Instantly share code, notes, and snippets.

@stevetalkscode
Created November 14, 2020 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevetalkscode/113ced02ddcce54540d89582881810fb to your computer and use it in GitHub Desktop.
Save stevetalkscode/113ced02ddcce54540d89582881810fb to your computer and use it in GitHub Desktop.
Example of explicit implementation of IDisposable
public class StartUp
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<SomeDisposable>();
}
}
public class SomeDisposable : IDisposable
{
void IDisposable.Dispose()
{
// dispose unmanaged resources here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment