Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Commenting code
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00726149
Message ID:
00726204
Views:
13
Perfect answer Cathi :)



>Hi Jim,
>
>C# distinguishes between single line comments and block comments. Single line comments use a double slash. All text after the slashes is assumed to be part of the comment. Here is an example:
>
>
>//This is a comment
>void MakeDeposit(int Amount)
>{
>   int _Balance;  //stores the Account balance
>   _Balance += Amount;
>}
>
>
>A block comment uses a slash followed by an asterisk (/*) at the beginning of the block, and an asterisk followed by a slash at the end of the comment block (*/). Block comments enable you to write full paragraphs of comments without having to put double slashes on every line. Here is an example:
>
>
>/*
>Function: MakeDeposit
>Scope: Public
>Description: Increases the balance for the account.
>*/
>public void MakeDeposit(int Amount /*Deposit Amount*/,
>  int AmountAvail /*How much is available*/)
>{
>}
>
>
>VB.NET has only a single-line comment. Comments are make either with the "Rem" statement or with a single aspostrophe (the most used method). Here is an example:
>
>
>'This is a comment
>Rem This is another comment
>Sub MakeDeposit(ByVal Amount as Integer)
>   Dim _Balance As Integer  'Account balance
>   _Balance += Amount
>End Sub
>
>
>>Does anybody know how do you comment a block of code?
>>
>>thanks jim
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Previous
Reply
Map
View

Click here to load this message in the networking platform