Hour 15. Attributes

In the last hour, you saw how Visual Studio .NET created all the necessary code required for an ATL Server project. What you may have also noticed was that the code for the project was not easily visible within your source files. The fact, however, is that the source was there, wrapped up in a new Visual C++ .NET feature called an attribute.

Attribute programming was designed to easily inject source code for common tasks into your code, freeing you from repeating the same tasks over and over again. The primary use of attribute programming is within projects that use the Component Object Model (COM), such as ATL Server, and projects that run within the .NET Framework common language runtime (CLR). You can, however, use attributes ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.