How to comment code in

How to comment C# code in

Comment code is important part of any kind of programming language.

Comment code is only visible at the part of programming side while run the program the comment code invisible at output side.

While complex programming we have more code at programmer side and many programmer can work on one project so we need to define the code logic with header comment code so other programmer can easily understood the code.

Two ways we can comment code in ASP.Net

  • Single Line Comments
  • Multi Lines Comments

Single Line Comments ASP.Net

In single line comments we can comment only single line using the comment expression using double slash “//”.

In above code we can see the how to comment single line using “//”.

In provide Comment out the selected lines icon to comment the line. We can comment line using shortcut key Select code for comments and press Ctrl+E, C.

How to comment code in c#.
How to comment code in c#.

Multi Lines Comments in ASP.Net

For multi lines comment write code between “/* ” and “*/”.

Example of multi lines comments in


How to comment code in c#.
How to comment code in c#.

1 thought on “How to comment code in

Leave a Reply

Your email address will not be published. Required fields are marked *