Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / January 2007

Tip: Looking for answers? Try searching our database.

Description Attribute in Class Library (DLL) ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JerryWEC - 03 Jan 2007 20:53 GMT
How do you get the description to display in a calling application when you use a description attribute on your properties in a class library (DLL)?

I'm using the following code in my dll (class library)...
Imports System.ComponentModel

<Description("Operator Name Property."), Category("Action")> _

Public Property OperatorName() As String

   Get

       Try

           Return m_OperatorName

       Catch ex As Exception

           ProcessException(ex)

           Return Nothing

       End Try

   End Get

   Set(ByVal value As String)

       Try

           m_OperatorName = value

       Catch ex As Exception

           ProcessException(ex)

       End Try

   End Set

End Property

is there another namespace to use or what is the story to get this to work?

JerryM
Linda Liu [MSFT] - 04 Jan 2007 06:56 GMT
Hi Jerry,

The DescriptionAttribute specifies a description for a property or event. A
visual designer can display the specified description when referencing the
component member, such as in a Properties window.

To get the description to display in a calling application, add the
following comment on the property you want.

/// <summary>
/// This is Operator Name Property.
/// </summary>
Public Property OperatorName() as String
{ ....}

Build the solution and you should get what you want.

Please try my suggestion and let me know the result.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
JerryWEC - 04 Jan 2007 14:07 GMT
Linda, thanks for the great feedback! This works fine!

Thanks! JerryM

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.