Using XML comments for documenting your code

Goal

Learn about a special XML comments which you can write in your code. These comments can be used for documenting your code for your team members

What are XML comments?

In Visual Studio there is a special way to write comments to describe a class, field, property, method etc. These comments are not like normal comments which you write in your code. These are special comments which you use to provide help to your team members who will be using your code. Visual Studio IntelliSense will read your XML comments and show them as help to other programmers using your code.

How to write XML comments?

XML comments are written on top of a class, property, method etc. They are not written inside the body. To write XML comments take your mouse on top of the class, property or method and press / three times. A block of XML comment will be generated automatically.

Writing XML comments on a class

See below how you can use XML comments to write description about your class

Writing XML comments on a class
 
Writing XML comments on a method

See below how you can use XML comments to write description about your methods

Writing XML comments on a method
 

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp