Question

I know you can use a .net reflector to view code created with .net but if I put something in the comments for my own personal reminder is that compiled in the exe as well.

I don't intend to release the source code for my application and i know the 100% safe bet is to just remove everything I don't want out but I was just wondering if someone could reverse engineer my comments.

Was it helpful?

Solution

Comments are ignored by the compiler. They will not be put into the output executable.

OTHER TIPS

No, comments are not in the compiled executable.

No, comments are not included in your code; however, classes, methods and members are. So, if you are using self-documenting code, some of the logic will be discernible. I recommend using obfuscation if you are concerned about anyone reflecting information from your delivered code.

As the other say: Comments are not compiled in. But you can enable the xml documentation creation in the C# project settings. If you then use the MS documentation syntax (/// <summary>...</summary> and so on) an extra .xml file will be generated.

If Reflector loads an assembly it also looks for the .xml documentation file and decorates the declarations with the documentation found in the XML file!

If you'd like to check what's in there yourself, get hold of the 'strings' utility (Cygwin version is fine) and run it over your code. It'll print out all the legible strings in your binary files. And no, as others have said, no comments make it through.

Not to worry, comments are ignored by the compiler.

Just note, the PDB files may contain this information.

Check out: How much information do pdb files contain? (C# / .NET)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top