Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comments compiled into .exe in .net?

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.

like image 234
Crash893 Avatar asked May 04 '09 19:05

Crash893


People also ask

Are comments compiled by compiler?

A token can be an identifier, a literal value, a reserved word, or an operator. Comments and whitespace are mostly ignored during this phase. They are only used to separate different tokens. In the next steps, there is no concept for a comment or a whitespace, so yes, they are removed while compiling.

Do comments get compiled C#?

No, comments are not in the compiled executable.

Does C# compile to exe?

After a developer writes the C# code, he or she compiles their code. This results in Common Intermediate Language stored within Portable Executable (PE for 32-bit, PE+ for 64-bit) files such as “.exe” and “. dll” files for Windows. These files are distributed to users.

What does .NET compile to?

NET apps are compiled to intermediate language (IL). At run time, the just-in-time (JIT) compiler translates the IL to native code. In contrast, . NET Native compiles UWP apps directly to native code.


1 Answers

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

like image 89
lingvomir Avatar answered Oct 12 '22 05:10

lingvomir