4 ms·
C# is IDisposable [1] for that kind of stuff and has the "using" block [2] to make it hard to get wrong. 1. https://learn.microsoft.com/en-us/dotnet/api/system
by SigmundA 3y ago
C# is IDisposable [1] for that kind of stuff and has the "using" block [2] to make it hard to get wrong.
1. https://learn.microsoft.com/en-us/dotnet/api/system.idisposable?view=net-8.0 https://learn.microsoft.com/en-us/dotnet/api/system.idisposa...
2. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/using https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...