O'Reilly logo

C# Primer: A Practical Approach by Stanley B. Lippman

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 2. Class Design

A class represents an abstraction, usually of our application domain. In computer graphics, for example, we manipulate classes representing lights, a camera, geometric shapes such as a sphere, cone, or cube, as well as curves and surfaces, and math classes such as matrices and vectors. In the design of a Windows application, we manipulate classes representing text boxes, buttons, labels, message boxes, and so on. The primary goal of this chapter is to familiarize you with the C# language support for designing and implementing classes.

In general, a class consists of two parts: a public set of operations and properties—called the public interface—and a private implementation. As users of a class, we are consumers of its ...

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