• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Properties

Now that the Ball objects are alive and ready to use, you can begin to tell ASP.NET what they look like. Looking at an object class and object instances from the previous example, there is something you should understand.

When you create an instance from a class, the class builds the object with default properties. These properties may simply have a default value that is empty. A ball has a color attribute because the class defines it. However, it may not have a value yet. Or maybe the Ball class creates a ball with a default color property of white. This is determined within the class; you’ll learn more later when we investigate the Ball class in detail.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint