[RESOLVED] What are these comments ?
While reading the code posted by paul, I found these comments.
vb Code:
''' <summary>
''' timer
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks>interval = 100ms</remarks>
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Panel1.AutoScrollPosition = New Point(Panel1.AutoScrollPosition.X, Math.Abs(Panel1.AutoScrollPosition.Y) + 1)
End Sub
What is the specialty of it ? And what is it used for ? :confused:
Re: What are these comments ?
That comment block is inserted by Visual Studio. You can emit them to an XML file that can be used to generate a help document. Also, you'll notice that once that kind of comment block is included ahead of a function declaration that Intellisense will show the comments when making a call to the affected function.
-Max :D
Re: What are these comments ?
Re: [RESOLVED] What are these comments ?
As an additional note, you insert this XML into your code by right-clicking on the method name and selecting 'Insert comment'. It'll add the XML code for you to describe the function and its parameters.
Re: [RESOLVED] What are these comments ?
Quote:
Originally Posted by
SJWhiteley
As an additional note, you insert this XML into your code by right-clicking on the method name and selecting 'Insert comment'. It'll add the XML code for you to describe the function and its parameters.
Thanks...:wave:
Re: [RESOLVED] What are these comments ?
Quote:
Originally Posted by
SJWhiteley
As an additional note, you insert this XML into your code by right-clicking on the method name and selecting 'Insert comment'. It'll add the XML code for you to describe the function and its parameters.
I didn't even know that. I, and I think most people, type three single quotes on the line before the method declaration and it has the same effect. I guess the better option depends on whether you're a mouse person or a keyboard person.
Re: [RESOLVED] What are these comments ?
Quote:
Originally Posted by
jmcilhinney
I didn't even know that. I, and I think most people, type three single quotes on the line before the method declaration and it has the same effect. I guess the better option depends on whether you're a mouse person or a keyboard person.
I found about the three-quotes by accident :) Yes, I'm very mouse-heavy, so do have to spend a lot (relative term) of time configuring keyboard navigation in applications so as to not annoy the keyboard surfers...