IT Community - Software Programming, Web Development and Technical Support

Difference between // comments, /* */ comments and /// comments

This is a discussion on Difference between // comments, /* */ comments and /// comments within the C# Programming forums, part of the Software Development category; Hi guys can anyone explain about the difference between // comments, /* */ comments and /// comments?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-30-2007, 04:58 AM
vigneshgets vigneshgets is offline
D-Web Genius
 
Join Date: Mar 2007
Posts: 904
vigneshgets is on a distinguished road
Post Difference between // comments, /* */ comments and /// comments

Hi guys can anyone explain about the difference between // comments, /* */ comments and /// comments?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007, 04:27 AM
ThaNerd ThaNerd is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 8
ThaNerd is on a distinguished road
Default Re: Difference between // comments, /* */ comments and /// comments

Simple...
// comments are comments until the end of the line...

Code:
int i = 1337; // This is a comment
/* */ comments allow inline or multiline comments:

Code:
for (int i = 12 /* Start at 12 */; i < 15 /* stop at 15 */; i++) {
    if (i % 2 == 0) {
        /* This
        rules */
    }
}
/// comments are parsed by the preprocessor to generate your app's documentation... Not usefull for building an exe, but really helpful when you build a reuseable dll meant to be used by other people...

(i won't sample here)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java:Reference - Proper Comments pranky Java Programming 0 02-23-2007 09:49 AM


All times are GMT -7. The time now is 04:39 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0