Can .NET ensembles like Reflector access comments in the source code?

comments are not XML comments, just normal comments

+6
reflector
source share
4 answers

Not. Comments are ignored by the compiler and have no representation in the assembly.

+15
source share

Disassembler cannot get source code. It will only create source code that does the same thing as the source code.

Since comments do not lead to any instructions in the program, they cannot be recreated from compiled code.

+6
source share

Just add Marks' answer - the XML / docstrings comments found in the source code are also not written to the assembly, nor are they available using Reflector.

XML comments are written to a separate XML file, which the Visual Studio IDE requires in order to be able to send these comments to intellisense.

+1
source share

No, he will not read the commented line from the source code.

+1
source share

All Articles