Home
Browse all 647 examples
Download all 647 examples
Download sample chapters
Reviews
Errata
Acknowledgments
Links on .NET
Paradoxal Press
Buy directly from Paradoxal Press at $33.99 (Save 43%)
Category: Programming
Level: Beginner to seasoned
900 pages
ISBN-10 097661322-0
ISBN-13 978-097661322-0
$59.99 USA
$79.99 CANADA
|
Chapter 11: Classes and objects
Chapter 10< > Chapter 12
Listings: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Table of content:
Introduction
Vocabulary
Class definition
Member access
Fields Initializing fields
Constant fields
Potential problem with field initialization
Methods Passing arguments by value or by reference Default C# rules
Passing any argument by reference
Using the ref keyword with a reference type Initializing arguments
Out parameters
The params keyword
Method overloading
Properties
The get accessor
The set accessor
Notes on properties
Indexer
Events
Introduction The C# syntax A practical example Asynchronous event handling Protecting your code from exceptions raised by subscriber methods in a synchronous scenario
Nested types
Encapsulation and visibility
Visibility of members
Visibility of types Visibility of property and indexer accessors Notes on private members Notes on visibility levels of the IL language
The this keyword
Constructors Declaring constructors
Accessing constructors when creating objects
Object finalization and destruction Destructor, finalizer and the Object.Finalize() method
The IDisposable interface and its Dispose() method
When do you need finalizer and Dispose() method?
Static members
Static fields, properties and events Static methods Class constructor (also named static constructor) Static classes
Operator overloading
Arithmetic operator overloading
Cast operator overloading
Comparison operator overloading Operator overloading and CLS
Copyright Patrick Smacchia 2006 2007
|