473,323 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

how to use the 'description' attribute in c#

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
1 10321
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
5
by: David N | last post by:
All, I created a control that have the following property defined: private bool autoSearch My control is compiled and created fine. But, after adding the control to my form, I noticed...
1
by: Vagabond Software | last post by:
I have added a few custom Description Attributes to an assembly. I have read that in order to make those Attributes culture neutral, I would have to create a custom Attribute class derived from...
1
by: Steven.Xu | last post by:
Hi, everyone. I am writting an user control. There has some properties on it. At the design time, the properties will disply on the property windows and user could change it's value after selected...
6
by: Sergey Poberezovskiy | last post by:
Hi, I have already asked the question, but probably did not make myself clear. Back in VB6 days when you created a public method/property/event you could define what's called "Procedure...
2
by: Larry Woods | last post by:
I am trying to put a description on a Constructor of a class. All doc says to Import System.ComponentModel, which I do. But in order to get "<Description" to be recognized I have to use...
0
by: Kamal | last post by:
Really appreciate any help related to this. How do we get the description attribute value. It is not working. Please let me know if anything wrong in this. Thanks for your help. private...
2
by: CMM | last post by:
In VS2005 / VB.NET, do you still have to spell out the ComponentModel.Description attribute when you want properties of a custom control to have description text in the Property Editor?... or can...
8
by: ismailc | last post by:
Hi, I would like to change the text color of (<xsl:value-of select="Description") onmouseover of image. the javascript works, it's just that i can seem to get the name correct <td>...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.