Open zspitz opened 6 years ago
hmm, Personally, the shorter the sample, the more pleasing I am. But perhaps, there are many copy and paste programmers in the world than we think. I think that you are right.
I'll update samples at a convenient time.
Using idiomatic C# is shorter in this case (no explicit call to Dispose
), than the same example in the readme.
Wrapping code in a
using
block is the standard way in .NET to free up resources.For example, instead of the current sample code for reading a file, how about this:
Read a File: