Skip to main content
  • 296 Accesses

Abstract

Classes are the heart of any application in an object-oriented language. This chapter is broken into several sections. The first section describes the parts of C# that will be used often, and the later sections describe things that won’t be used as often, depending on what kind of code is being written.

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.

Reference

  1. For those of you used to pointers, a reference is a pointer that you can only assign to and dereference.

    Google Scholar 

  2. The garbage collector used in the.NET Runtime is discussed in Chapter 36, “Deeper into C#.”

    Google Scholar 

  3. If you were really going to implement your own point class, you’d probably want it to be a value type (struct) rather than a reference type (class).

    Google Scholar 

  4. From the perspective of other.NET languages, there is no difference between ref and out parameters. A C# program calling this function will see the parameters as out parameters, but other languages will see them as ref parameters.

    Google Scholar 

  5. This function may look like a C++ copy constructor, but the C# language doesn’t use such a concept. A constructor such as this must be called explicitly.

    Google Scholar 

Download references

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Eric Gunnerson

About this chapter

Cite this chapter

Gunnerson, E. (2001). Classes 101. In: A Programmer’s Introduction to C#. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0909-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-1-4302-0909-6_5

  • Publisher Name: Apress, Berkeley, CA

  • Print ISBN: 978-1-893115-62-0

  • Online ISBN: 978-1-4302-0909-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics