Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Visual COBOL equivalent to C# "Using" statement?

$
0
0

Sorry about that!

As you already know, "using" has always been a reserved word in Cobol, and I read from MSDN here that "The using statement ensures that Dispose is called even if an exception occurs while you are calling methods on the object. You can achieve the same result by putting the object inside a try block and then calling Dispose in a finally block; in fact, this is how the using statement is translated by the compiler. "

In Visual COBOL, you will then need to use the Try...Finally construction.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>