I.T. Discussion Community!
-Collapse +Expand
C#
Search C# Group:

Advanced
-Collapse +Expand C# To/From
To/FromCODEGuides
-Collapse +Expand C# Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C# Store
PRESTWOODSTORE

Prestwood eMagazine

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

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

Attributes

cheddar
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 15 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=5395
Last Reply Posted 6/21/2007 1:29:57 PM)
Location=Lodi, CA  
Joined=18 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
http://www.prestwood.com

 Posted 12 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 adamlum.com.


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=13 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 = P1174A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #10457 Counter
5395
Since 4/2/2008
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech