Explain what happens in the background when a source code in C Sharp is compiled and finally an executable code is generated?