O'Reilly logo

CLR via C#, 3rd Edition by Jeffrey Richter

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 10. Properties

In this chapter:

Parameterless Properties 237

Parameterful Properties 252

The Performance of Calling Property Accessor Methods 257

Property Accessor Accessibility 258

Generic Property Accessor Methods 258

In this chapter, I'll talk about properties. Properties allow source code to call a method by using a simplified syntax. The common language runtime (CLR) offers two kinds of properties: parameterless properties, which are simply called properties, and parameterful properties, which are called different names by different programming languages. For example, C# calls parameterful properties indexers, and Microsoft Visual Basic calls them default properties. I'll also talk about initializing properties using object and ...

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