Info
Version: | 8.0.1 |
Author(s): | Daniel M. Porrey |
Last Update: | Wednesday, September 11, 2024 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/porrey/TryDisposable |
NuGet Url: | https://www.nuget.org/packages/TryDisposable |
Install
Install-Package TryDisposable
dotnet add package TryDisposable
paket add TryDisposable
TryDisposable Download (Unzip the "nupkg" after downloading)
Dependencies
.NETFramework 4.5
No dependencies.
- NETStandard.Library(>= 1.6.1)
No dependencies.
No dependencies.
No dependencies.
No dependencies.
No dependencies.
Tags
This is useful when retrieving an instance of an object from a factory or container while only having an interface reference. If the interface does not implement IDisposable or IAsyncDisposable, but the concrete class does, this will allow you to dispose the instance without the need to check for the interface and cast it.