How to comment code in asp.net



How to comment C# code in asp.net

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 asp.net 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 asp.net c#.

How to comment code in asp.net c#.


Multi Lines Comments in ASP.Net

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

Example of multi lines comments in asp.net

 

How to comment code in asp.net c#.

How to comment code in asp.net c#.

Leave a Reply

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

3 + 4 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">