如何定义一个实例? [英] How to define an instance?

查看:78
本文介绍了如何定义一个实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

面试中有人问我一个问题,但我无法回答...这是问题

I was asked a question in an interview and i wasn't able to answer it... Here is the question

  • 您将如何定义实例[c#]?

我的回答是它是object的另一个名字...这个问题的正确答案是什么...

My answer was it is an other name of an object... what is the right answer for this question...

推荐答案

实例属于类,配方属于类.每当您使用构造函数创建对象时,都在创建实例.

Instance is to class as cake is to recipe. Any time you use a constructor to create an object, you are creating an instance.

这篇关于如何定义一个实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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