Share via


using (C# Reference)

The using keyword has two major uses:

  • As a directive, when it is used to create an alias for a namespace or to import types defined in other namespaces. See using Directive.

  • As a statement, when it defines a scope at the end of which an object will be disposed. See using Statement.

See Also

Reference

C# Keywords

Namespace Keywords (C# Reference)

Namespaces (C# Programming Guide)

extern (C# Reference)

Concepts

C# Programming Guide

Other Resources

C# Reference