6 ms·
The C# version is lacking the using pattern. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement https://docs.microsoft.c
by niklasjansson 7y ago
The C# version is lacking the using pattern.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- quantified 7y agoSimilar for Java's try-with-resources. Also, I use a style in Java with higher-order functions (aka Callables/Runnables) that's like the pattern ascribed to Ruby, for situations not covered by AutoCloseable.
- gnoack 7y agoThanks for the pointers, adding them to the article (with credits)