Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
21.5 Metadata as Binary Headers

21.5 Metadata as Binary Headers

Visual Studio .NET 2003

With the #using directive and metadata files, you can restructure your program to reduce the number of header files. It is faster to import a metadata file via #using than it is to parse the corresponding header file.

As mentioned in Section 21.4, any file containing metadata can be imported with the #using directive. This helps to decouple dependencies and can speed compilation.


  • If the file named in a #using directive is an assembly, only managed classes marked public will be visible.
  • If the file named in a #using directive is not an assembly, then all managed classes, public or private, will be visible.

This allows programmers to use .obj files as binary headers in their own projects, while enforcing visibility rules when the whole project is deployed.

© 2015 Microsoft