Properties, Methods, and Events

A class’s data and behaviors are determined by three features: properties, methods, and events. These features allow objects to interact with other parts of the program.

Together, properties, methods, and events are referred to as the class’s members.

Properties

Properties are data values associated with the class. For example, a Person class might have properties such as FirstName, LastName, Street, City, State, and Zip.

Different properties can have different accessibility levels. For example, some properties could be private (available only to code inside the class) and others could be public (available to all the code in the program).

Different languages may provide properties in different ways. The simplest method ...

Get Start Here!™ Fundamentals of Microsoft® .NET Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.