views:

368

answers:

8

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/

Thanks

Crash

+6  A: 

No, comments are not in the compiled executable.

Jonathan
+17  A: 

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

lingvomir
+4  A: 

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.

julianz
+1  A: 

Not to worry, comments are ignored by the compiler.

Rich.Carpenter
+6  A: 

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.

Lucas B
+3  A: 

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!

rstevens
A: 

i found the best obfuscator on the web, eazfuscator :)))

[http://www.foss.kharkov.ua/g1/projects/eazfuscator/dotnet/Default.aspx%5D%5B1%5D

I couldn't use dotfuscator CE in VS Pro 2008 as i was using an app.config setting for usernames and the exe just crashes when you obfuscate. with eazfuscator it worked flawlessly and it's FREE!!!!!!!!!!

net noobie
A: 

Just note, the PDB files may contain this information.

Check out: http://stackoverflow.com/questions/596512/how-much-information-does-pdb-files-contain-c-net

Noon Silk