Search code examples
.netcommentsvisible

.net Code-Comments visible in final program?


i want to know if the entered comments in .net-Code (Visual Studio) like // this is a comment or ' this is a comment will be visible in the final program?

(Or could be made visible).

I already searched for it on google.

Thanks guys!


Solution

  • Short answer: NO, it won't. Compiler would try to minimize the size of the compiled program by doing anything it could. Lets say you got an if (false) statement in your code the compiler would just remove that completely. So comments which is completely useless for execution would definitely not be in the compiled program.