Hour 3. Understanding Objects and Collections


What You'll Learn in This Hour:

  • Understanding objects

  • Getting and setting properties

  • Triggering methods

  • Understanding method dynamism

  • Writing object-based code

  • Understanding collections

  • Using the Object Browser

In Hour 1, "Jumping In with Both Feet: A Visual C# 2005 Programming Tour," you were introduced to programming in Visual C# by building a Picture Viewer project. You then spent Hour 2, "Navigating Visual C# 2005," digging into the integrated development environment (IDE) and learning skills critical to your success with Visual C#. In this hour, you're going to start learning about an important programming concept, namely objects.

The term object as it relates to programming might have been new to you prior to this book. The more you work with Visual C#, the more you'll hear about objects. Visual C# 2005 is a true object-oriented language. This hour isn't going to discuss object-oriented programming in any detailobject-oriented programming is a complex subject and well beyond the scope of this book. Instead, you'll learn about objects in a more general sense.

Everything you use in Visual C# is an object, so understanding this material is critical to your success with Visual C#. For example, forms are objects, as are the controls you place on a form; pretty much every element of a Visual C# project is an object and belongs to a collection of objects. All objects have attributes (called properties), most have methods, and many have events. Whether creating simple applications or building large-scale enterprise solutions, you must understand what an object is and how it works to be successful. In this hour, you'll learn what makes an object an object, and you'll also learn about collections.

By the Way

If you've listened to the programming press at all, you've probably heard the term object oriented, and perhaps words such as polymorphism, encapsulation, and inheritance. In truth, these object-oriented features of Visual C# are exciting, but they're far beyond Hour 3 (or Hour 24, for that matter). You'll learn a little about object-oriented programming in this book, but if you're really interested in taking your programming skills to the next level, you should buy a book dedicated to the subject after you've completed this book.





Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net