类型与类 [英] Type versus Class
本文介绍了类型与类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我总是使用class这个词。描述一个可以实例化的类。
然而,我没有得到类型的概念。或者至少我不知道如何使用这个词来正确使用这个词。如果我有一个名为Person的类,它的类型是什么?
以及它与课程有什么关系?
提前谢谢。
mark
I always use the word "class" to describe a class that can be instantiated.
However, I don''t get the concept of "Type" or at least I don''t know how to
use the word properly. If I have a class called Person, what is its "Type"
and how does it relate to the class?
Thanks in advance.
mark
推荐答案
大多数情况下,class特别指的是引用类型,而类型
指的是引用类型和值类型
Mark。 <音响****** @ idonotlikejunkmail.umn.edu>在消息中写道
新闻:#u ************** @ TK2MSFTNGP12.phx.gbl ...
Mostly, "class" refers particularly to references types, while "type"
refers to both Reference Types, and Value Types
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:#u**************@TK2MSFTNGP12.phx.gbl...
我总是使用单词class描述一个可以实例化
的类。但是,我没有得到类型的概念。或者至少我不知道如何正确使用这个词。如果我有一个名为Person的类,那么它的
" Type"它与课程有什么关系?
I always use the word "class" to describe a class that can be instantiated. However, I don''t get the concept of "Type" or at least I don''t know how to
use the word properly. If I have a class called Person, what is its "Type" and how does it relate to the class?
所以这意味着我也可以谈论我的人物类型,只是
查看我之前的Person class?的措辞。我希望两者之间有更多的确切差异...
再次感谢。
Mark
" James Curran" < JA ********* @ mvps.org>在消息中写道
news:uz ************** @ tk2msftngp13.phx.gbl ...
So this means I could just as well talk about my "Person type", and just
chuck my previous wording of "Person class?" I''m hoping there is a more
precise difference between the two ...
Thanks again.
Mark
"James Curran" <ja*********@mvps.org> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
大多数情况下,class ;特别是指引用类型,而类型指的是引用类型和值类型
Mark。 <音响****** @ idonotlikejunkmail.umn.edu>在消息中写道
新闻:#u ************** @ TK2MSFTNGP12.phx.gbl ...
Mostly, "class" refers particularly to references types, while "type"
refers to both Reference Types, and Value Types
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:#u**************@TK2MSFTNGP12.phx.gbl...
我总是使用class这个词;描述一个可以
I always use the word "class" to describe a class that can be
实例化的类。
但是,我没有得到类型的概念。或者至少我不知道
如何正确使用这个词。如果我有一个名为Person的类,它的
However, I don''t get the concept of "Type" or at least I don''t know how to use the word properly. If I have a class called Person, what is its
" Type"
"Type"
是什么?它与该类有什么关系?
and how does it relate to the class?
类是一个模板,用于定义
类型的成员和操作。
....如果有帮助的话! :)
P.
A class is a template that defines the members and operations of a
type.
....if that helps! :)
P.
这篇关于类型与类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文