Your full service technology partner! 
-Collapse +Expand
Search C# Group:

-Collapse +Expand C# To/From
-Collapse +Expand C# Study Test
-Collapse +Expand C# Store

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyC# (Visual C# & VS.Net) BoardC# & WinForms Topic   Print This     


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
 Posted 18 years ago (Thread Starter)
Comment Quote
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=5648
Last Reply Posted 6/21/2007 1:29:57 PM)
Location=Lodi, CA  
Joined=21 years ago   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

 Posted 15 years ago
Comment Quote
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=16 years ago   MB Posts=31   KB Posts=23   KB Comments=4   BLOG, Topics=1  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1183A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #10457 Counter
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2022 Prestwood IT Solutions.   [Security & Privacy]