[This post is part of a series, "wish-list for future versions of VB"]
IDEA: Allow Catch statements in Using blocks. A Using block is just a Try/Finally block that calls "Dispose" in its destructor. It'd be handy if you could stick "Catch" statements inside the Using block as well. In other words, this code
Using x As New C
Catch ex As System.IO.FileFormatException
would be shorthand for this:
Dim x As New C
If x IsNot Nothing Then
Provisional evaluation from VB team: it's a decent idea, one worth considering against the other desirable features. What do you think? Does it provide enough benefit to be worth adding to the language?