When a .Net based executable is double clicked,
_CorExeMain
function is called first. Each managed .Net executable will have a entry point (Main method) in the CLR header. This function initializes CLR and then locates entry point in the assembly's CLR header and then begins execution.
_CorExeMain Function[
^] details can be found here on MSDN.