School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,443 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,529 people online right now. Registration is fast and FREE... Join Now!




Adding Documentation & Summaries to your code.

 
Reply to this topicStart new topic

> Adding Documentation & Summaries to your code.

Rating  5
AdamSpeight2008
Group Icon



post 10 Sep, 2008 - 05:37 PM
Post #1


Seeing that C# as a tutorial on Code Documentation.
arrow.gifJacobJordan's C# Adding Documentation & Summaries to your code Tutorial
I show you how to do the same in VB.Net.

Adding Documentation
As you been typing away you may have notice the handy pop up message that appear giving you more information about the method you are using.
Example
IPB Image

Let's imagine we want document the following function.
vb

Public Function Multiply(ByVal X As Double, ByVal Y As Double) As Double
Return X * Y
End Function


Within your class and just out the routine you want to add documentation for.
Type: '''
And Visual Studio will insert the correct tags for you.
vb

''' <summary>
''' A description of what the function does.
''' </summary>
''' <param name="X">Description of the first parameter</param>
''' <param name="Y">Description of the second parameter</param>
''' <returns>Description for what the function returns</returns>
''' <remarks>Text put here will not display in a Visual Studio summary box.
''' It is meant to add in further detail for anyone who might read this
''' code in the future </remarks>
Public Function Multiply(ByVal X As Double, ByVal Y As Double) As Double
Return X * Y
End Function

OK now you can document you code.

"What about the GUI Designer?", I heard you ask.

Property Grid Tags
So you've created a custom control.
Add the following the each of the property want to appear in the Properties Window.
vb

< _
System.ComponentModel.Category("My Controls Properties") , _
System.ComponentModel.DisplayName("Property Name") , _
System.ComponentModel.Description("Changes the background color of clock") , _
System.ComponentModel.DefaultValue(0)
>


System.ComponentModel.Category("My Controls Properties")
This places the property under the category My Controls Properties inside properties window of the Form Designer.
System.ComponentModel.DisplayName("Property Namer")
This is the displayed name of the property.
System.ComponentModel.Description("Changes the background color of clock")
This is the textual description of what the property does.
System.ComponentModel.DefaultValue(0)
This is the default value.

Now you're one step closes to being a Code-Documenting Ninja ph34r.gif
Attachments
Attached Image
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!


Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 11/8/09 01:29AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month