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