-
-
Save stevetalkscode/113ced02ddcce54540d89582881810fb to your computer and use it in GitHub Desktop.
Example of explicit implementation of IDisposable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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