By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,672 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,672 IT Pros & Developers. It's quick & easy.

how to use the 'description' attribute in c#

P: n/a
KPK
Hello:

What namespace do I need to import in order to use the description
attribute in c#? I have class with custom properties and I would like
to have a description of the properties displayed on the property
page.

Here is the format I'm using:

[Description("User's Name")]
public string Name
{
get
{
return m_strName;
}
set
{
m_strName = value;
}
}

all it tells me is that type of namespace name cannot be found.

thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
KPK <kp******@linuxmail.org> wrote:
What namespace do I need to import in order to use the description
attribute in c#?


System.ComponentModel.

The way to find this out in future is to look for the class name in
MSDN (DescriptionAttribute in this case) - that tells you the full name
of the class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.