Skip to main content

Object-Oriented Programming with C# 2.0

  • Chapter
Pro C# 2005 and the .NET 2.0 Platform
  • 401 Accesses

Summary

If you already come to the universe of .NET from another object-oriented language, this chapter may have been more of a quick compare and contrast between your current language of choice and C#. On the other hand, if you are exploring OOP for the first time, you may have found many of the concepts presented here a bit confounding. Fear not; as you work through the remainder of this book, you will have have numerous opportunities to solidify the concepts presented here.

This chapter began with a review of the pillars of OOP: encapsulation, inheritance, and polymorphism. Encapsulation services can be accounted for using traditional accessor/mutator methods, type properties, or read-only public fields. Inheritance under C# could not be any simpler, given that the language does not provide a specific keyword, but rather makes use of the simple colon operator. Last but not least, you have polymorphism, which is supported via the abstract, virtual, override, and new keywords.

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

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Andrew Troelsen

About this chapter

Cite this chapter

(2005). Object-Oriented Programming with C# 2.0. In: Pro C# 2005 and the .NET 2.0 Platform. Apress. https://doi.org/10.1007/978-1-4302-0060-4_4

Download citation

Publish with us

Policies and ethics