tags:

views:

38

answers:

1

Hi,

I created one web user control with property named "ReadonlyField" with boolean datatype. I am able to use in my web pages and now i wanted to add a description to that property so that i dont need to explain each time to my team member what is that property's intention.

I got following snippet in c# but didnt find any equivalent in vb.net and also not sure whether it will work or not.

[Description("My Description")] public int MyIntProperty { get {..} set {..} }

I appreciate your help

thanks anto

+1  A: 

A literal translation in VB 10

<Description("My Description")> Public Property MyIntProperty As Integer

If this is for other programmers you may want to offer Intellisense support via XML comments. This is the standard way of doing it in both VB and C#.

VB

 ''' <summary>
 ''' Description goes here
 ''' </summary>
 ''' <value></value>
 ''' <returns></returns>
 ''' <remarks></remarks>
 Public Property MyIntProperty As Integer
Jonathan Allen
Thanks for your quick reply. I was looking for the description to be displayed in the bottom status bar of the properties window. I tried <description> with System.ComponentModel and no error. But still i cant see the description in the properties window status bar :(. Do i need to do any additional steps to accomplish this?
Antoops
Everything I've read says that you are doing it the right way. Maybe it's something stupid like you need to clean your project or even restart Visual Studio.
Jonathan Allen
Even I tried all those restarting VS and rebuilding everything but till now it didnt work. Anyways i am using the remarks for telling the description. thanks for your help!!
Antoops