Abstract
In this chapter, we explored the flexible property, indexer, and custom operator features to look at the different ways they can be used. If you have come to C# from a language that doesn’t have an equivalent to these features, you might be asking, why not just use methods? You can certainly do that, but these are powerful and expressive convenience features that reduce code clutter and make working with C# objects more natural. You can certainly write C# programs without using properties, indexers, and operators, but I suggest you keep them in mind. They tend to grow on you as you begin to use them.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Adam Freeman
About this chapter
Cite this chapter
Freeman, A. (2010). Properties, Indexers, and Operators. In: Introducing Visual C# 2010. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-3172-1_8
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3172-1_8
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-3171-4
Online ISBN: 978-1-4302-3172-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)