Public Property display

  • Thread starter Thread starter jvcoach23
  • Start date Start date
J

jvcoach23

I'm using some public properties that i create in a custom class. my
question is how do you add a comment so that it will show up in intellesense
when you are using that property. say

Public Class Testing
private mFilterData as string
public property FilterData as string
get
return mFilterData
end get
set....
....
end property
end class


when i call that property it tells me it needs a string, but i'd like to add
a descrition, like Microsofts does... say like "This is a description to help
you know what youare suppose to put in."


thanks
 
[...]
when i call that property it tells me it needs a string, but i'd like to  
add
a descrition, like Microsofts does... say like "This is a description to  
help
you know what youare suppose to put in."

See "XML comments".  I don't know how this is done in VB.NET, but in C# 
you use "///" to preface the comments instead of "//" or surrounding them 
with "/* */", and then use specific XML tags in the comments to indicate  
different parts of the comment.  Presumably there's a similar comment  
syntax you can use in VB.NET.  If you look up "XML comments" on MSDN,  
you'll probably be able to find more details.

Actually, MSDN calls them "XML Code Comments" ("XML Comments" are <!--
-->). In VB, it's three single-quotation marks:

''' <summary>Foos the bar</summary>
Sub FooBar()
...
End Sub
 
great.. thanks much to both of you

Pavel Minaev said:
[...]
when i call that property it tells me it needs a string, but i'd like to
add
a descrition, like Microsofts does... say like "This is a description to
help
you know what youare suppose to put in."

See "XML comments". I don't know how this is done in VB.NET, but in C#
you use "///" to preface the comments instead of "//" or surrounding them
with "/* */", and then use specific XML tags in the comments to indicate
different parts of the comment. Presumably there's a similar comment
syntax you can use in VB.NET. If you look up "XML comments" on MSDN,
you'll probably be able to find more details.

Actually, MSDN calls them "XML Code Comments" ("XML Comments" are <!--
-->). In VB, it's three single-quotation marks:

''' <summary>Foos the bar</summary>
Sub FooBar()
...
End Sub
 
Right.  I guess that's why this page is called "XML Comments Sample".  :)http://msdn.microsoft.com/en-us/library/81162k3z.aspx

My experience has been that MSDN calls them a variety of things.  The joys  
of documentation.  :)

I think it's a C#/VB difference. Because VB 2008 has XML literals now,
it also has XML-style comments as part of the language, so they had to
disambiguate. At least, searching MSDN index for the phrase gives
articles on C# and C++ immediately, but not on VB.
 
Back
Top