| | Learning C# 2005, Second Edition |
| | Dedication |
| | Preface |
| | | About This Book |
| | | Who This Book Is For |
| | | How the Book Is Organized |
| | | Conventions Used in This Book |
| | | Using Code Examples |
| | | Support |
| | | We'd Like to Hear from You |
| | | Safari Enabled |
| | | Acknowledgments |
| | Chapter 1. C# and .NET Programming |
| | | Section 1.1. C# 2005 and .NET 2.0 |
| | | Section 1.2. The .NET Platform |
| | | Section 1.3. The .NET 2.0 Framework |
| | | Section 1.4. The C# Language |
| | | Section 1.5. The Structure of C# Applications |
| | | Section 1.6. The Development Environment |
| | | Section 1.7. What's in a Program? |
| | | Section 1.8. Your First Program: Hello World |
| | | Section 1.9. The Compiler |
| | | Section 1.10. Examining Your First Program |
| | | Section 1.11. Summary |
| | | Section 1.12. Quiz |
| | | Section 1.13. Exercise |
| | Chapter 2. Visual Studio 2005 |
| | | Section 2.1. Before You Read Further |
| | | Section 2.2. Start Page |
| | | Section 2.3. Projects and Solutions |
| | | Section 2.4. Inside the Integrated Development Environment |
| | | Section 2.5. Building and Running |
| | | Section 2.6. Menus and Toolbars |
| | | Section 2.7. Summary |
| | | Section 2.8. Quiz |
| | | Section 2.9. Exercise |
| | Chapter 3. C# Language Fundamentals |
| | | Section 3.1. Statements |
| | | Section 3.2. Types |
| | | Section 3.3. Variables |
| | | Section 3.4. Definite Assignment |
| | | Section 3.5. Constants |
| | | Section 3.6. Strings |
| | | Section 3.7. Expressions |
| | | Section 3.8. Whitespace |
| | | Section 3.9. Summary |
| | | Section 3.10. Quiz |
| | | Section 3.11. Exercises |
| | Chapter 4. Operators |
| | | Section 4.1. The Assignment Operator (=) |
| | | Section 4.2. Mathematical Operators |
| | | Section 4.3. Increment and Decrement Operators |
| | | Section 4.4. Relational Operators |
| | | Section 4.5. Summary |
| | | Section 4.6. Quiz |
| | | Section 4.7. Exercises |
| | Chapter 5. Branching |
| | | Section 5.1. Unconditional Branching Statements |
| | | Section 5.2. Conditional Branching Statements |
| | | Section 5.3. Iteration (Looping) Statements |
| | | Section 5.4. Summary |
| | | Section 5.5. Quiz |
| | | Section 5.6. Exercises |
| | Chapter 6. Object-Oriented Programming |
| | | Section 6.1. Creating Models |
| | | Section 6.2. Classes and Objects |
| | | Section 6.3. Defining a Class |
| | | Section 6.4. Class Relationships |
| | | Section 6.5. The Three Pillars of Object-Oriented Programming |
| | | Section 6.6. Object-Oriented Analysis and Design |
| | | Section 6.7. Summary |
| | | Section 6.8. Quiz |
| | | Section 6.9. Exercises |
| | Chapter 7. Classes and Objects |
| | | Section 7.1. Defining Classes |
| | | Section 7.2. Method Arguments |
| | | Section 7.3. Constructors |
| | | Section 7.4. Initializers |
| | | Section 7.5. The this Keyword |
| | | Section 7.6. Static and Instance Members |
| | | Section 7.7. Destroying Objects |
| | | Section 7.8. Memory Allocation: The Stack Versus the Heap |
| | | Section 7.9. Summary |
| | | Section 7.10. Quiz |
| | | Section 7.11. Exercises |
| | Chapter 8. Inside Methods |
| | | Section 8.1. Overloading Methods |
| | | Section 8.2. Encapsulating Data with Properties |
| | | Section 8.3. Returning Multiple Values |
| | | Section 8.4. Summary |
| | | Section 8.5. Quiz |
| | | Section 8.6. Exercises |
| | Chapter 9. Basic Debugging |
| | | Section 9.1. Setting a Breakpoint |
| | | Section 9.2. Examining Values: The Autos and Locals Windows |
| | | Section 9.3. Set Your Watch |
| | | Section 9.4. The Call Stack |
| | | Section 9.5. Summary |
| | | Section 9.6. Quiz |
| | | Section 9.7. Exercises |
| | Chapter 10. Arrays |
| | | Section 10.1. Using Arrays |
| | | Section 10.2. The foreach Statement |
| | | Section 10.3. Initializing Array Elements |
| | | Section 10.4. The params Keyword |
| | | Section 10.5. Multidimensional Arrays |
| | | Section 10.6. Array Methods |
| | | Section 10.7. Sorting Arrays |
| | | Section 10.8. Summary |
| | | Section 10.9. Quiz |
| | | Section 10.10. Exercises |
| | Chapter 11. Inheritance and Polymorphism |
| | | Section 11.1. Specialization and Generalization |
| | | Section 11.2. Inheritance |
| | | Section 11.3. Polymorphism |
| | | Section 11.4. Abstract Classes |
| | | Section 11.5. Sealed Classes |
| | | Section 11.6. The Root of All Classes: Object |
| | | Section 11.7. Boxing and Unboxing Types |
| | | Section 11.8. Summary |
| | | Section 11.9. Quiz |
| | | Section 11.10. Exercises |
| | Chapter 12. Operator Overloading |
| | | Section 12.1. Using the operator Keyword |
| | | Section 12.2. Creating Useful Operators |
| | | Section 12.3. The Equals Operator |
| | | Section 12.4. Conversion Operators |
| | | Section 12.5. Summary |
| | | Section 12.6. Quiz |
| | | Section 12.7. Exercises |
| | Chapter 13. Interfaces |
| | | Section 13.1. Implementing an Interface |
| | | Section 13.2. Implementing More than One Interface |
| | | Section 13.3. Casting to an Interface |
| | | Section 13.4. The is and as Operators |
| | | Section 13.5. Extending Interfaces |
| | | Section 13.6. Combining Interfaces |
| | | Section 13.7. Overriding Interface Implementations |
| | | Section 13.8. Explicit Interface Implementation |
| | | Section 13.9. Summary |
| | | Section 13.10. Quiz |
| | | Section 13.11. Exercises |
| | Chapter 14. Generics and Collections |
| | | Section 14.1. Generics |
| | | Section 14.2. Collection Interfaces |
| | | Section 14.3. Creating Your Own Collections |
| | | Section 14.4. Framework Generic Collections |
| | | Section 14.5. Summary |
| | | Section 14.6. Quiz |
| | | Section 14.7. Exercises |
| | Chapter 15. Strings |
| | | Section 15.1. Creating Strings |
| | | Section 15.2. Manipulating Strings |
| | | Section 15.3. Regular Expressions |
| | | Section 15.4. The Regex Class |
| | | Section 15.5. Summary |
| | | Section 15.6. Quiz |
| | | Section 15.7. Exercises |
| | Chapter 16. Throwing and Catching Exceptions |
| | | Section 16.1. Bugs, Errors, and Exceptions |
| | | Section 16.2. Throwing Exceptions |
| | | Section 16.3. Searching for an Exception Handler |
| | | Section 16.4. The throw Statement |
| | | Section 16.5. The try and catch Statements |
| | | Section 16.6. How the Call Stack Works |
| | | Section 16.7. Creating Dedicated catch Statements |
| | | Section 16.8. The finally Statement |
| | | Section 16.9. Exception Class Methods and Properties |
| | | Section 16.10. Custom Exceptions |
| | | Section 16.11. Summary |
| | | Section 16.12. Quiz |
| | | Section 16.13. Exercises |
| | Chapter 17. Delegates and Events |
| | | Section 17.1. Delegates |
| | | Section 17.2. Multicasting |
| | | Section 17.3. Events |
| | | Section 17.4. Using Anonymous Methods |
| | | Section 17.5. Summary |
| | | Section 17.6. Quiz |
| | | Section 17.7. Exercises |
| | Chapter 18. Creating Windows Applications |
| | | Section 18.1. Creating a Simple Windows Form |
| | | Section 18.2. Creating a Real-World Application |
| | | Section 18.3. XML Documentation Comments |
| | | Section 18.4. Summary |
| | | Section 18.5. Quiz |
| | | Section 18.6. Exercises |
| | Chapter 19. Programming ASP.NET Applications |
| | | Section 19.1. Understanding Web Forms |
| | | Section 19.2. Web Form Events |
| | | Section 19.3. Creating a Web Form |
| | | Section 19.4. Adding Controls |
| | | Section 19.5. Server Controls |
| | | Section 19.6. Data Binding |
| | | Section 19.7. Adding Controls and Events |
| | | Section 19.8. Summary |
| | | Section 19.9. Quiz |
| | | Section 19.10. Exercises |
| | Appendix A. Answers to Quizzes and Exercises |
| | | Section A.1. Chapter 1: C# and .NET Programming |
| | | Section A.2. Chapter 2: Visual Studio 2005 |
| | | Section A.3. Chapter 3: C# Language Fundamentals |
| | | Section A.4. Chapter 4: Operators |
| | | Section A.5. Chapter 5: Branching |
| | | Section A.6. Chapter 6: Object-Oriented Programming |
| | | Section A.7. Chapter 7: Classes and Objects |
| | | Section A.8. Chapter 8: Inside Methods |
| | | Section A.9. Chapter 9: Basic Debugging |
| | | Section A.10. Chapter 10: Arrays |
| | | Section A.11. Chapter 11: Inheritance and Polymorphism |
| | | Section A.12. Chapter 12: Operator Overloading |
| | | Section A.13. Chapter 13: Interfaces |
| | | Section A.14. Chapter 14: Generics and Collections |
| | | Section A.15. Chapter 15: Strings |
| | | Section A.16. Chapter 16: Throwing and Catching Exceptions |
| | | Section A.17. Chapter 17: Delegates and Events |
| | | Section A.18. Chapter 18: Creating Windows Applications |
| | | Section A.19. Chapter 19: Programming ASP.NET Applications |
| | About the Author |
| | Colophon |
| | Index |