C# Code Comments  
Author Message
GBC143





PostPosted: Visual C# Language, C# Code Comments Top

For // comments in C# , are they included in the DLL or do you have an option to include or exclude

For /// comments, same question.



Visual C#13  
 
 
Mattias Sjogren





PostPosted: Visual C# Language, C# Code Comments Top

Comments are never included in the executable.

XML comments (///) are written to a separate XML file, regular comments only exist in your source files.



 
 
RizwanSharp





PostPosted: Visual C# Language, C# Code Comments Top

All Types of comments in every programming langauge is surpressed by compiler/interpretter so these are never present in Executables.

Best Regards,

Rizwan



 
 
Gregory Panakkal





PostPosted: Visual C# Language, C# Code Comments Top

if you have XML style comments in code ie. ones prefixed with /// , these can be used to generated documentation of your classes using tools like ndoc. Comments never get included in the output binary.



 
 
theblueeyz





PostPosted: Visual C# Language, C# Code Comments Top

If you're wondering how you get that nice Intellisense documentation - make sure in your project properties, under the Build tab, you've checked the "Create XML Documentation: " box. It will place an XML file with your comments next to the binary that is output (this is pretty much meaningless for executables, but is very useful for .dll's).

If you move the binary around, make sure you take the XML document with it!

Any class, member, property, or method comments will get included in the XML file, if prefaced with the /// syntax, and if you're using Visual Studio, it will automatically generate the useful fields in the comment for you.