-
Chapter 1 C# and .NET Programming
-
Installing C# Express
-
C# 3.0 and .NET 3.5
-
The .NET Platform
-
The .NET Framework
-
The C# Language
-
Your First Program: Hello World
-
The Compiler
-
Examining Your First Program
-
The Integrated Development Environment
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercise
-
-
Chapter 2 Visual Studio 2008 and C# Express 2008
-
Before You Read Further
-
The Start Page
-
Projects and Solutions
-
Inside the Integrated Development Environment
-
Building and Running Applications
-
Menus
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 3 C# Language Fundamentals
-
Statements
-
Types
-
WriteLine( ) and Output
-
Variables and Assignment
-
Casting
-
Constants
-
Strings
-
Whitespace
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 4 Operators
-
Expressions
-
The Assignment Operator (=)
-
Mathematical Operators
-
Increment and Decrement Operators
-
Relational Operators
-
Logical Operators and Conditionals
-
The Conditional Operator
-
Operator Precedence
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 5 Branching
-
Unconditional Branching Statements
-
Conditional Branching Statements
-
ReadLine( ) and Input
-
Iteration (Looping) Statements
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 6 Object-Oriented Programming
-
Creating Models
-
Classes and Objects
-
Defining a Class
-
Class Relationships
-
The Three Pillars of Object-Oriented Programming
-
Object-Oriented Analysis and Design
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 7 Classes and Objects
-
Defining Classes
-
Method Arguments
-
Return Types
-
Constructors
-
Initializers
-
Object Initializers
-
Anonymous Types
-
The this Keyword
-
Static and Instance Members
-
Finalizing Objects
-
Memory Allocation: The Stack Versus the Heap
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 8 Inside Methods
-
Overloading Methods
-
Encapsulating Data with Properties
-
Returning Multiple Values
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 9 Basic Debugging
-
Setting a Breakpoint
-
Examining Values: The Autos and Locals Windows
-
Setting Your Watch
-
The Call Stack
-
Stopping Debugging
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 10 Arrays
-
Using Arrays
-
The foreach Statement
-
Initializing Array Elements
-
The params Keyword
-
Multidimensional Arrays
-
Array Methods
-
Sorting Arrays
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 11 Inheritance and Polymorphism
-
Specialization and Generalization
-
Inheritance
-
Polymorphism
-
Abstract Classes
-
Sealed Classes
-
The Root of All Classes: Object
-
Summary
-
Test Your Knowlege: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 12 Operator Overloading
-
Designing the Fraction Class
-
Using the operator Keyword
-
Creating Useful Operators
-
The Equals Operator
-
Conversion Operators
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 13 Interfaces
-
What Interfaces Are
-
Implementing an Interface
-
Implementing More Than One Interface
-
Casting to an Interface
-
The is and as Operators
-
Extending Interfaces
-
Combining Interfaces
-
Overriding Interface Methods
-
Explicit Interface Implementation
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 14 Generics and Collections
-
Generics
-
Collection Interfaces
-
Creating Your Own Collections
-
Framework Generic Collections
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 15 Strings
-
Creating Strings
-
Manipulating Strings
-
Regular Expressions
-
The Regex Class
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 16 Throwing and Catching Exceptions
-
Bugs, Errors, and Exceptions
-
Throwing Exceptions
-
Searching for an Exception Handler
-
The throw Statement
-
The try and catch Statements
-
How the Call Stack Works
-
Creating Dedicated catch Statements
-
The finally Statement
-
Exception Class Methods and Properties
-
Custom Exceptions
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 17 Delegates and Events
-
Delegates
-
Using Anonymous Methods
-
Lambda Expressions
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 18 Creating Windows Applications
-
Creating a Simple Windows Form
-
Creating a Real-World Application
-
Source Code
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 19 Windows Presentation Foundation
-
Your First WPF Application
-
WPF Differences from Windows Forms
-
Using Resources
-
Animations
-
C# and WPF
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 20 ADO.NET and Relational Databases
-
Relational Databases and SQL
-
The ADO.NET Object Model
-
Getting Started with ADO.NET
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Chapter 21 LINQ
-
Querying In-Memory Data
-
Anonymous Types and Implicitly Typed Variables
-
Lambda Expressions
-
Ordering and Joining
-
Using LINQ with SQL
-
Using the Object Relational Designer
-
Summary
-
Test Your Knowledge: Quiz
-
Test Your Knowledge: Exercises
-
-
Appendix Answers to Quizzes and Exercises
-
Chapter 1: C# and .NET Programming
-
Chapter 2: Visual Studio 2008 and C# Express 2008
-
Chapter 3: C# Language Fundamentals
-
Chapter 4: Operators
-
Chapter 5: Branching
-
Chapter 6: Object-Oriented Programming
-
Chapter 7: Classes and Objects
-
Chapter 8: Inside Methods
-
Chapter 9: Basic Debugging
-
Chapter 10: Arrays
-
Chapter 11: Inheritance and Polymorphism
-
Chapter 12: Operator Overloading
-
Chapter 13: Interfaces
-
Chapter 14: Generics and Collections
-
Chapter 15: Strings
-
Chapter 16: Throwing and Catching Exceptions
-
Chapter 17: Delegates and Events
-
Chapter 18: Creating Windows Applications
-
Chapter 19: Windows Presentation Foundation
-
Chapter 20: ADO.NET and Relational Databases
-
Chapter 21: LINQ
-
-
Colophon
- Title:
- Learning C# 3.0
- By:
- Jesse Liberty, Brian MacDonald
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- November 2008
- Ebook Release:
- November 2008
- Pages:
- 704
- Print ISBN:
- 978-0-596-52106-6
- | ISBN 10:
- 0-596-52106-5
- Ebook ISBN:
- 978-0-596-15683-1
- | ISBN 10:
- 0-596-15683-9
The animal on the cover of Learning C# 3.0 is a butterflyfish, which is a tropical marine fish from the family Chaetodontidae. Butterflyfish live mainly among the reefs of the Atlantic, Pacific, and Indian oceans. Occasionally mistaken for angelfish (the angelfish is larger), butterflyfish can be recognized by their contrasting color patterns of black, orange, blue, red, or yellow. Their vibrant colors also make them a popular aquarium attraction.
Although the fish are striking in appearance, many species of butterflyfish do have the ability to fool their predators. In addition to swimming nimbly through coral reefs, the four-eyed butterflyfish is so named because of a large dark spot surrounded by a white ring on each side of the back of its body; predators often mistake these prominent dark spots for the butterflyfish's eyes, which are smaller and partly obscured by a dark, vertical stripe.
While some butterflyfish never mate, others in the species will find a partner and remain monogamous for the rest of their lives. Once partnered, the two butterflyfish will find an area of coral reef that is suitable for them and will defend their home from others of its kind by changing the colors on their bodies, an act that is interpreted by intruders as an aggressive maneuver.
For food, the butterfly fish will peck at coral and rock formations and eat polyps, worms, and various small invertebrates. The fish's particular eating habits may ultimately drive it to extinction, some scientists say, as coral reefs are deteriorating because of overexploitation by humans, pollution, and climate change.
The cover image is from Johnson's Natural History. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed.
