Geeks With Blogs

News

View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites


Anthony Trudeau

Attributes are elements of metadata that you can attach to entities such as assemblies, classes, methods, properties, et al.  The .NET Framework makes use of many attributes that allow you to affect the behavior of the compiler or how the Framework uses an entity.  For example, you can assign attributes to properties of a control object that allow a friendly  name and description to be shown in the property browser in Visual Studio.

At some point, you'll come into a situation where you'll want to use a custom attribute.  Defining and using attributes are very easy and in this article I will provide a very simple setup using a few attributes defined at the class level.  Defining and using attributes at other levels vary only slightly and I'll make note when there is a difference.

Read the rest of the article

Posted on Wednesday, January 16, 2008 9:51 AM .NET | Back to top


Comments on this post: Overview of custom attributes

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Anthony Trudeau | Powered by: GeeksWithBlogs.net