More a question out of curiosity than anything, but why does C# define two different "purposes" for the keyword using
? On one hand, it's a directive...
used to create an alias for a namespace or to import types defined in other namespaces.
On the other, it's a statement which...
defines a scope, outside of which an object or objects will be disposed.
To me, it seems like different uses for the same keyword, but maybe I'm missing something. Is there a reason why this keyword takes on two different purposes? Or, are both of these purposes, deep down in the belly of the compiler, really the same thing?