为了澄清我的问题. [英] To clear my question.
本文介绍了为了澄清我的问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,先生,为什么我们使用默认构造函数.默认构造函数的目的是什么?当默认构造函数调用程序时.请清楚地告诉我您的答案
hello sir., why we use default constructor. what is the purpose purpose of default constructor. when default constructor call on program. kindly tell me your answer clearly
推荐答案
默认构造函数是无参数构造函数,当您不显式提供任何构造函数时会隐式定义.在哪里使用?好吧,当您需要不执行任何操作的无参数构造函数时.为什么要在默认情况下拥有一个显式定义它.
—SA
The default constructor is a parameterless constructor which is implicitly defined when you do not supply any constructors explicitly. Where to use it? Well, when you need a parameterless constructor which does nothing. Why would you define one explicitly, when you can have it by default.
—SA
请参阅:
http://www.dotnetperls.com/default-constructor [
refer:
http://www.dotnetperls.com/default-constructor[^]
SA的答案应为您提供对"默认构造子".
请查看以下链接,以获取有关"构造函数"的更多信息.
http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29
http://msdn.microsoft.com/en-us/library/ms173115%28v = vs.80%29.aspx#MSDN
http://msdn.microsoft.com/en-us/library/ace5hbzh.aspx
SA''s answer should provide you precise understanding about "Default Constructor".
Have a look at below links for more information on "Constructors".
http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29
http://msdn.microsoft.com/en-us/library/ms173115%28v=vs.80%29.aspx#MSDN
http://msdn.microsoft.com/en-us/library/ace5hbzh.aspx
这篇关于为了澄清我的问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文