O'Reilly logo

C# 2010 for Programmers, Fourth Edition by Harvey M. Deitel, Paul J. Deitel

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

4. Introduction to Classes and Objects

Objectives

In this chapter you’ll learn:

• What classes, objects, methods and instance variables are.

• How to declare a class and use it to create an object.

• How to implement a class’s behaviors as methods.

• How to implement a class’s attributes as instance variables and properties.

• How to call an object’s methods to make them perform their tasks.

• The differences between instance variables of a class and local variables of a method.

• How to use a constructor to ensure that an object’s data is initialized when the object is created.

• The differences between value types and reference types.

Nothing can have value without being an object of utility.

Karl Marx

Your public servants serve you right. ...

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