Lodi, CA

Am I to understand correctly that Attributes can omit the word Attribute when they are referenced? I.E. Although WebMethod is used all the time the correct name of the class really is WebMethodAttribute? This seems a little useless.

Eric Neff
C#, ASP.Net, SQL Server, Oracle
About cheddar -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #10457, 1 replies
Thread Started 5/18/2004 8:03:00 AM
View Counter=5418
Last Reply Posted 6/21/2007 1:29:57 PM)
Location=Lodi, CA  
Joined=7/9/2001   MB Posts=88  
Most Recent Post
Adam Lum
Prestwood IT
Citrus Heights, CA

Dropping the 'Attribute' part of the is just a convention that is commonly practiced.  You can use the full class name WebMethodAttribute as well without any trouble.

If the class name minus the 'Attribute' substring is some sort of keyword or reserved word or something like that, you'll of course have to use the full name in that case. 

Adam Lum
Senior Programmer
Prestwood Software

About Adam Lum -Collapse +Expand
Visit Profile
Approved member.
Member does not subscribe to this thread.
About Adam Lum

Adam Lum is a part time developer for Prestwood Software and participates in this online community when time allows. His day-to-day work is C# coding but his current intrests (right now) are Ruby on Rails and iOS programming with Objective-C.  He has also coded several projects in Java, C++, ASP Classic, and PHP.  His personal website can be found at

Post ID #11916 (Level 1.1)  Reply to 10457
Thread Started 6/21/2007 1:29:57 PM
View Counter=2
Location=Citrus Heights, CA 
Joined=2/5/2006   MB Posts=31   KB Posts=23   KB Comments=4   BLOG, Topics=1
Copyright (C) Prestwood IT Solutions.
All Rights Reserved.
Printed 9/19/2019