You are previewing Beginning Object-Oriented Programming with C#.
O'Reilly logo
Beginning Object-Oriented Programming with C#

Book Description

The ideal beginner's guide to C# and object-oriented programming

Wrox beginners' guides have the perfect formula for getting programming newcomers up and running. This one introduces beginners to object-oriented programming using C# to demonstrate all of the core constructs of this programming framework. Using real-world situations, you'll discover how to create, test, and deliver your programs and how to work with classes, arrays, collections, and all the elements of object-oriented programming.

  • Covers exactly what beginners, even those with no prior programming experience, need to know to understand object-oriented programming and start writing programs in C#

  • Explains the advantages and disadvantages of C#, and tips for understanding C# syntax

  • Explores properties, encapsulation, and classes; value data types; operands and operators; errors and debugging; variables; and reference types

  • Shows how to use statement repetition and program loops, understand arrays and collections, and write your own classes

  • Also covers inheritance and polymorphism

Beginning Object-Oriented Programming with C# uses the tried-and-true Wrox formula for making this popular programming method easy to learn.

Table of Contents

  1. Cover
  2. Part I: Getting Started
    1. Chapter 1: Introducing C#
      1. A Short History of Object-Oriented Programming (OOP)
      2. Installing C#
      3. A Test Program Using C#
      4. Summary
    2. Chapter 2: Understanding Objects
      1. Understanding Objects
      2. Getting Started with Objects
      3. Developing a Program Plan
      4. Creating a Simple Application Using Objects
      5. Using C# to Implement Your Program Plan
      6. Summary
  3. Part II: Understanding C# Syntax
    1. Chapter 3: Understanding Data Types
      1. Computer Data
      2. Floating-Point Data Types
      3. Monetary Values: The Decimal Data Type
      4. Using IntelliSense to Locate Program Errors
      5. The Boolean Data Type
      6. Summary
    2. Chapter 4: Understanding C# Statements
      1. Basic Building Blocks of a Programming Language
      2. Defining Variables
      3. Using a Variable in a Program
      4. The Bucket Analogy
      5. Types of Program Errors
      6. The Visual Studio Debugger
      7. Using the Visual Studio Debugger
      8. Defensive Coding
      9. Summary
    3. Chapter 5: Understanding Reference Data Types
      1. String Variables
      2. Using String Variables
      3. Datetime Reference Objects
      4. Summary
    4. Chapter 6: Making Decisions in Code
      1. Relational Operators
      2. Logical Operators
      3. The switch Statement
      4. Summary
    5. Chapter 7: Statement Repetition Using Loops
      1. Program Loops
      2. Nested for Loops
      3. While Loops
      4. do-while Program Loops
      5. The Continue Statement
      6. Summary
    6. Chapter 8: Understanding Arrays and Collections
      1. What Is an Array?
      2. The ListView Object
      3. Arrays Are Objects
      4. Multidimensional Arrays
      5. Initializing Arrays
      6. Collections
      7. ArrayList Objects
      8. Summary
  4. Part III: Writing Your Own Classes
    1. Chapter 9: Designing Classes
      1. Class Design
      2. Designing a Program
      3. UML Light
      4. The clsDates Design
      5. User Interfaces Versus User Interfaces
      6. Summary
    2. Chapter 10: Designing and Writing Custom Classes
      1. Constructors
      2. Property Methods
      3. What to Do if an Error Occurs in a Property Method
      4. Class Design for Deck-of-Cards Program
      5. Designing a Card Game Using clsCardDeck
      6. Summary
    3. Chapter 11: Exception Handling and Debugging
      1. Overview
      2. Input Errors
      3. Exception Handling
      4. Program Debugging
      5. Summary
    4. Chapter 12: Generics
      1. What Are Generics?
      2. Introduction to Generics
      3. Generic Quicksort
      4. Summary
  5. Part IV: Storing Data
    1. Chapter 13: Using Disk Data Files
      1. Directories
      2. File Class
      3. FileInfo Class
      4. Types of Files
      5. Sequential Versus Random Access Files
      6. Serialization and Deserialization
      7. MDI, Menus, and File Dialogs
      8. Summary
    2. Chapter 14: Using Databases
      1. What Is a Database?
      2. Creating Your Own Databases
      3. Using SQL
      4. A DBMS System
      5. Summary
    3. Chapter 15: Using LINQ
      1. Using LINQ
      2. Summary
  6. Part V: Advanced Topics
    1. Chapter 16: Inheritance and Polymorphism
      1. What Is Inheritance?
      2. Polymorphism
      3. Extension Methods
      4. Summary
    2. Chapter 17: Printing and Threading
      1. Using a Printer
      2. Threading
      3. Refactoring
      4. Summary
    3. Chapter 18: Web Programming
      1. Static Web Pages
      2. Dynamic Web Pages
      3. Summary
  7. Appendix: Answers to Exercises
    1. Chapter 2
    2. Chapter 3
    3. Chapter 4
    4. Chapter 5
    5. Chapter 6
    6. Chapter 7
    7. Chapter 8
    8. Chapter 9
    9. Chapter 10
    10. Chapter 11
    11. Chapter 12
    12. Chapter 13
    13. Chapter 14
    14. Chapter 15
    15. Chapter 16
    16. Chapter 17
    17. Chapter 18
  8. Introduction
    1. Who This Book Is For
    2. What This Book Covers
    3. How This Book Is Structured
    4. What You Need to Use This Book
    5. Conventions
    6. Source Code
    7. Errata
    8. p2p.wrox.com
  9. Advertisement