How to comment in C Sharp:
In Computer Programming Comments are used to remember things and to make programming easy .One thing that makes comments unique is that these are not seen by compiler or not executed while program is running . You can comment in lines as well as in paragraphs. Line by line method or one line comment uses the following syntax.Step 1:
Type two forward slashesStep 2:
Then type what ever you want on this line.Example:
//Creating tow string variables.
Or
Now if you want an paragraph of comments you have to use the following Syntax.
Step 1:
Type on forward Slash and then type a Star ( * )Step 2:
Type a paragraph of commentsStep 3:
Now time to close the paragraph of Comments..type star (*) and then forward slash.
Now in this way you can close the paragraph
Example:
An other way to comment is to use comment button .
Select the line you want to convert in to comment and then press comment button as shown.



No comments:
Post a Comment