Abstract
In the Chapters 3 and 4, you investigated a number of core syntactical constructs that are commonplace to any .NET application you might be developing. Here, you will begin your examination of the objectoriented capabilities of C#. The first order of business is to examine the process of building well-defined class types that support any number of constructors. After you understand the basics of defining classes and allocating objects, the remainder of this chapter will examine the role of encapsulation. Along the way, you will learn how to define class properties, and come to understand the role of static members, object initialization syntax, read-only fields, constant data, and partial classes.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Andrew Troelsen
About this chapter
Cite this chapter
Troelsen, A. (2012). Understanding Encapsulation. In: Pro C# 5.0 and the .NET 4.5 Framework. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4234-5_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4234-5_5
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4233-8
Online ISBN: 978-1-4302-4234-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)