Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.