+ 2
Using in C#
What is the difference in using "using" in the library declaration and in the part of the code? for example, using (StreamWriter write = new StreamWriter ("")) { // code }
2 Answers
+ 3
First using is for declaring namespaces and the second using is for dispose everything that created in the bracket after it finished
+ 2
This is the same world but it is used for different things.
At the first case it is used as derective for more comfortable work with different namespaces.
At second case it is used as operator witch allows you to use more convenient syntax for working with IDisposable objects.