Hacker News new | ask | show | jobs
by radicalbyte 4353 days ago
Erik's example of the using statement is a straw-man: you get exactly the same problems if you do this:

using(var file = File.Open(path)) { _someField = file; }

..and then use _someField in another method.

It's not so much a problem with understanding closures, but of the limitations of IDisposable.