2007年7月18日 星期三

用一張圖來解釋 Class ,Object, Instace 之間的關係

http://www.asp101.com/articles/sample_chapters/sitepoint_byoaspnet/chapter3.asp
Classes
You can think of a class as a template for building as many objects as you like of a particular type. When you create an instance of a class, you are creating an object of that class, and the new object has all the characteristics and behaviors (properties and methods) defined by the class.In our dog example, Rayne was an instance of the Dog class as shown in Figure 3.4.




沒有留言: