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 directly within native C++ projects in some instances.

In this hour you will learn:

  • How attributes simplify your programming tasks

  • How Visual Studio .NET handles attributes during the build process

  • How to create an ATL project that uses attributes

  • How to view the injected code within your source file


   
Top


Sams Teach Yourself Visual C++. NET in 24 Hours
Sams Teach Yourself Visual C++.NET in 24 Hours
ISBN: 0672323230
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net