Skip to main content

Properties, Indexers, and Operators

  • Chapter
Book cover Introducing Visual C# 2010
  • 1689 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics