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.
Characteristics
- If the file named in a
#usingdirective is an assembly, only managed classes markedpublicwill be visible. - If the file named in a
#usingdirective is not an assembly, then all managed classes,publicorprivate, 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.