As far as i can tell, using() is just more convenient syntax, whereas on allows a little more flexibility … Either way, when the using block is exited (either by successful completion or by error) it is closed. That will cause … // do something what is the difference between using and await using? Can you elaborate on that? · just in case its not clear from the other answers here: How should i decide which one to use? Using or in an if statement (python) [duplicate] asked 7 years, modified viewed 163k times · using calls dispose() after the using -block is left, even if the code throws an exception. The problem with putting using namespace in the header files of your classes is that it forces anyone who wants to use your classes (by including your header files) to also be using (i. e. Basically, just remove the braces … · user kokos answered the wonderful hidden features of c# question by mentioning the using keyword. - do not put a using declaration (or using directive) at file scope in an include file/header! · in a mysql join, what is the difference between on and using()? What are the uses of using? Although i think it would be better to organize like this because its a lot easier to see … · 74 using has virtually the same syntax in vb as c#, assuming youre using. net 2. 0 or later (which implies the vb. net v8 compiler or later). · using var disposable = new disposable(); Updating the using keyword was specifically for templates, and (as was pointed out in the accepted answer) when you are working with non-templates using and typedef are … So you usually use using for classes that require cleaning up after them, like io.