2014年9月10日 星期三

"class" and "object"

http://msdn.microsoft.com/en-us/library/zztsbwsx(v=vs.90).aspx
以下是MSDN的說明

The words "class" and "object" are used so much in object-oriented programming that it is easy to confuse the terms. Generally speaking, a class is an abstract representation of something, whereas an object is a usable example of the thing the class represents. The one exception to this rule is shared class members, which are usable in both instances of a class and object variables declared as the type of the class.


類別(class)與物件(Object)的差別到底是什麼?
從MSDN的說明,基本上看不大懂,所以網路上看到Teddy大的文章,才稍微了解一些。
http://teddy-chen-tw.blogspot.tw/2012/01/2object-class-instance.html

Class是用來描述Object的東西。
像是紅色、衣服是CLASS,人、狗是Object。
人.衣服.紅色
狗.衣服.紅色
我的理解大概是這樣~若有更好的說明~歡迎大家一起討論~

沒有留言:

張貼留言