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

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

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

Attributes

cheddar
Lodi, CA
Rank: Ensign

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=5306
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
Rank: Captain

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 = P1252A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #10457 Counter
5306
Since 4/2/2008
-
   Contact Us!
 
PrestwoodBoards.com was developed and is maintainted by me. Do you have a question or suggestion? Do you see a problem? Contact me now. My goal is to build an ad-free and spam-free source of I.T. information with many contributers (ok to promote your website/company in your bio). Yes, my company Prestwood IT Solutions is mentioned in my bio which shows with every post, but you can contribute and promote your pet project too!

2,122 People Online Now!!  
Sign In to see who's online now!  Not a member? Join now. It's free!
Show more stats...


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