using (C# reference)

The using keyword has two major uses:

  • The using statement defines a scope at the end of which an object is disposed.
  • The using directive creates an alias for a namespace or imports types defined in other namespaces.

See also