-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Sanjay_Narang
Message 6 in Discussion

To give you a very simple example that you would have seen many times:

Suppose you have a button control in a form, and you select its "Name" property in 
Property Window, observe following two things:

- At the bottom of property window, you see text explaining the property. in this case 
it is: "Indicates the name used in code to identify the object"

- if you are using "categorized" view of property window, this property come under 
"Design" category.

How do you think, Visual studio knows, what is the description of the selected 
property and which category that belongs to?

That is retrieved exactly through custom attributes. The property should have been 
defined like this:

Description("Indicates the name used in code to identify the 
object"),Category("Design")] 
 public string Name {
    get {
       // Insert code here.
       return propertyName;
    }
    set {
       // Insert code here.
    }
 }


HTH

Cheers
Sanjay

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to