The Java 7 'try with resources' statement is a shortcut for a try/finally block which closes an object of type java.io.Closeable. The VB equivalent is the 'Using' statement, which operates on objects of type System.IDisposable:
|try (Foo f = new Foo())
|Using f As New Foo()
Use Java to VB Converter to convert from Java to VB.
VB.NET and Java Equivalents
Copyright © 1997 – 2018 Tangible Software Solutions, Inc.