
196 Chapter 5 • .NET Programming Fundamentals
Notice that the Args array is an object and that we have used the length
property to determine how many arguments were passed into the function.We
then used a For loop to multiply all of the arguments together and return the
result.
Object Oriented Programming
An object is an entity that contains state (or data) and behavior (methods).Think
of a car. A car is a single object, yet it has numerous parts and behaviors.A car has
a body, frame, wheels, doors, and so on. It’s a single object made up of smaller
objects.A car also has behavior (or actions).You can drive it, open the doors,
turn, and so on.All of this ...