首先执行什么 [英] What will execute first

查看:59
本文介绍了首先执行什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

程序的哪一部分将首先执行
1.main或
2.静态方法

到底发生了什么以及将在什么内存中进行分配.

请给我发送任何链接.... i是dot net的新手.

which part of the program will execute first
1.the main or
2.the static methods

what exactly happens and in what the memory will be allocated.

please send me any links ....i am new to dot net

推荐答案

每次编译器都调用main方法,然后调用其他方法.
主要方法是执行的切入点. 在此处检查 [
Every time compiler called main method and then call other method.
Main method is entry point of exeecution. check here[^]


main首先执行(毕竟是应用程序入口点:" 这不是C++,不是C++ * ).除了main 是静态方法之外,它一文不值.



(*)在C++中,静态对象的构造函数在main启动之前执行.
main is executed first (it is the application entry-point, after all: "this not C++, this is not C++ *"). It is worthy nothing than main is a static method.



(*) In C++ constructors of static objects are executed before main starts.


这篇关于首先执行什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆