O'Reilly logo

Special Edition Using C# by NIIT

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

Properties

Although C# borrows many of its features from C++, there are some language features that are unique to C#. Properties are one such language feature. A property is a member that provides access to an attribute of an object or a class. Examples of properties can be the length of a string or size of font. Properties are an extension of fields. Both fields and properties are named elements with associated types. However, unlike fields, properties are not used to denote storage locations. Properties have accessors, which are used to specify the statements to execute in order to read or write their values. Properties thus provide a mechanism for associating actions with the reading and writing of private fields of an object. They are used ...

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