O'Reilly logo

Microsoft® Visual C#® 2005 Step by Step by John Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Understanding Values and References

After completing this chapter, you will be able to:

  • Explain the differences between a value type and a reference type.

  • Modify the way in which arguments are passed as method parameters, by using the ref and out keywords.

  • Box a value by initializing or assigning a variable of type object.

  • Unbox a value by casting the object reference that refers to the boxed value.

In Chapter 7, you learned how to declare your own classes and create objects by using the new keyword. You also saw how to build an object by using a constructor. In this chapter, you will learn about the very different characteristics of the primitive types (such as int) and class types (such as Circle).

Copying int Variables and Classes

All primitive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required