C# 24-Hour Trainer, 2nd Edition

Book description

Quickly learn to program in C# programming with this unique book and video package

C# 24-Hour Trainer, 2nd Edition is your quick and easy guide to programming in C#, even if you have no programming experience at all. Updated to align with the latest C# standard, this book is your comprehensive beginner's guide, with each lesson supplemented by a video, for over ten hours of video training. Each chapter focuses on a specific concept or technique, with detailed, easy-to-follow explanation followed by a hands-on exercise. The goals of each exercise are outlined in advance to help you understand what you're working toward, and step-by-step instructions walk you through the operation from start to finish. Complex areas are clarified with specifically highlighted pointers that head off confusion, and additional exercises are provided so you can practice your new skills. Full instructor ancillaries are included to make this guide classroom ready, and the author's own website offers ongoing support.

C# has become one of the most popular programming languages in the world, with millions of lines of code used in businesses and applications of all types and sizes. This book helps you dive right in so you can start programming right away.

  • Start right in with the latest C# standard
  • Learn at your own pace, with hands-on practice
  • Clear up confusion and work around common obstacles
  • Build your own Windows, .NET, and mobile applications

C# has become a increasingly popular and in-demand programming skillsets. If you've decided to learn C#, this 24-Hour Trainer is your ultimate guide.

Table of contents

  1. Introduction
    1. What's New in the Second Edition
    2. Who This Book Is For
    3. What This Book Covers (And What It Doesn't)
    4. The Wrox 24-Hour Trainer Approach
    5. How This Book Is Structured
    6. What You Need to Use This Book
    7. Conventions
    8. Source Code
    9. Errata
    10. p2p.wrox.com
  2. Section I: The Visual Studio IDE and Controls
    1. Lesson 1: Getting Started with the Visual Studio IDE
      1. Installing C#
      2. Configuring the IDE
      3. Building Your First Program
      4. Copying Projects
      5. Exploring the IDE
      6. Try It
      7. Exercises
    2. Lesson 2: Creating Controls
      1. Understanding Controls
      2. Creating Controls
      3. Setting Control Properties
      4. Arranging Controls
      5. WPF Controls
      6. Try It
      7. Exercises
    3. Lesson 3: Making Controls Arrange Themselves
      1. Restricting Form Size
      2. Using Anchor Properties
      3. Using Dock Properties
      4. Layout Containers
      5. Try It
      6. Exercises
    4. Lesson 4: Handling Events
      1. Making Event Handlers
      2. Using Event Parameters
      3. Removing Event Handlers
      4. Adding and Removing Event Handlers in Code
      5. Useful Events
      6. Try It
      7. Exercises
    5. Lesson 5: Making Menus
      1. Creating Menus
      2. Setting Menu Properties
      3. Handling Menu Events
      4. Creating Context Menus
      5. WPF Menus
      6. WPF Context Menus
      7. WPF Commanding
      8. Try It
      9. Exercises
    6. Lesson 6: Making Tool Strips and Status Strips
      1. Using Tool Strips
      2. Using Tool Strip Containers
      3. Using Status Strips
      4. Try It
      5. Exercises
    7. Lesson 7: Using RichTextBoxes
      1. Using RichTextBox Properties
      2. Giving the User Control
      3. Using RichTextBox Methods
      4. Using WPF Commands
      5. Try It
      6. Exercises
    8. Lesson 8: Using Standard Dialogs
      1. Using Dialogs in General
      2. Using Dialog Properties
      3. Using File Filters
      4. Using Dialogs in WPF
      5. Try It
      6. Exercises
    9. Lesson 9: Creating and Displaying New Forms
      1. Adding New Forms
      2. Understanding Classes and Instances
      3. Displaying Forms
      4. Controlling Remote Forms
      5. Try It
      6. Exercises
    10. Lesson 10: Building Custom Dialogs
      1. Making Custom Dialogs
      2. Setting the Dialog Result
      3. Using Custom Dialogs
      4. Try It
      5. Exercises
  3. Section II: Variables and Calculations
    1. Lesson 11: Using Variables and Performing Calculations
      1. What Are Variables?
      2. Data Types
      3. Declaring Variables
      4. Literal Values
      5. Type Conversions
      6. Performing Calculations
      7. Constants
      8. Try It
      9. Exercises
    2. Lesson 12: Debugging Code
      1. Deferred Techniques
      2. Debugging Then and Now
      3. Setting Breakpoints
      4. Reading Variables
      5. Stepping Through Code
      6. Using Watches
      7. Using the Immediate Window
      8. Try It
      9. Exercises
    3. Lesson 13: Understanding Scope
      1. Scope within a Class
      2. Accessibility
      3. Restricting Scope and Accessibility
      4. Try It
      5. Exercises
    4. Lesson 14: Working with Strings
      1. String Methods
      2. Format and ToString
      3. Try It
      4. Exercises
    5. Lesson 15: Working with Dates and Times
      1. Creating DateTime Variables
      2. Local and UTC Time
      3. DateTime Properties and Methods
      4. TimeSpans
      5. Try It
      6. Exercises
    6. Lesson 16: Using Arrays and Collections
      1. Arrays
      2. Collection Classes
      3. Try It
      4. Exercises
    7. Lesson 17: Using Enumerations and Structures
      1. Enumerations
      2. Structures
      3. Structures Versus Classes
      4. Where to Put Structures
      5. Try It
      6. Exercises
  4. Section III: Program Statements
    1. Lesson 18: Making Choices
      1. Decision Statements
      2. if Statements
      3. if-else Statements
      4. Cascading if Statements
      5. Nested if Statements
      6. Switch Statements
      7. Try It
      8. Exercises
    2. Lesson 19: Repeating Program Steps
      1. for Loops
      2. Foreach Loops
      3. while Loops
      4. do Loops
      5. break and continue
      6. Try It
      7. Exercises
    3. Lesson 20: Reusing Code with Methods
      1. Method Advantages
      2. Method Syntax
      3. Using ref Parameters
      4. Using out Parameters
      5. Try It
      6. Exercises
    4. Lesson 21: Handling Errors
      1. Errors and Exceptions
      2. try-catch Blocks
      3. TryParse
      4. Throwing Exceptions
      5. Try It
      6. Exercises
    5. Lesson 22: Preventing Bugs
      1. Input Assertions
      2. Other Assertions
      3. Try It
      4. Exercises
  5. Section IV: Classes
    1. Lesson 23: Defining Classes
      1. What Is a Class?
      2. Class Benefits
      3. Making a Class
      4. Try It
      5. Methods
      6. Events
      7. Try It
      8. Inheritance
      9. Polymorphism
      10. Try It
      11. Exercises
    2. Lesson 24: Initializing Objects
      1. Initializing Objects
      2. Constructors
      3. Destructors
      4. Invoking Other Constructors
      5. Try It
      6. Exercises
    3. Lesson 25: Fine-Tuning Classes
      1. Overloading Methods
      2. Overriding Methods
      3. Overriding ToString
      4. Try It
      5. Exercises
    4. Lesson 26: Overloading Operators
      1. Overloadable Operators
      2. Unary Operators
      3. Binary Operators
      4. Comparison Operators
      5. Conversion Operators
      6. Try It
      7. Exercises
    5. Lesson 27: Using Interfaces
      1. Interface Advantages
      2. Implementing Interfaces
      3. Defining Interfaces
      4. Try It
      5. Exercises
    6. Lesson 28: Making Generic Classes
      1. Defining Generic Classes
      2. Using Generic Constraints
      3. Making Generic Methods
      4. Try It
      5. Exercises
  6. Section V: System Interactions
    1. Lesson 29: Using Files
      1. Filesystem Classes
      2. Path
      3. Streams
      4. Try It
      5. Exercises
    2. Lesson 30: Printing
      1. Windows Forms Printing
      2. WPF Printing
      3. Printing Visuals
      4. Try It
      5. Exercises
  7. Section VI: Windows Apps
    1. Lesson 31: Windows Store Apps
      1. Navigation Style
      2. App Styles
      3. App Images
      4. Deployment
      5. WPF Techniques
      6. Try It
      7. Exercises
    2. Lesson 32: Windows Phone Apps
      1. Building Apps
      2. Navigation Style
      3. App Styles
      4. App Images
      5. Try It
      6. Exercises
  8. Section VII: Specialized Topics
    1. Lesson 33: Localizing Programs
      1. Understanding Localization
      2. Building Localized Interfaces
      3. Testing Localizations
      4. Processing Locale-Specific Values
      5. Try It
      6. Exercises
    2. Lesson 34: Programming Databases, Part 1
      1. Connecting to a Database
      2. Displaying Data in a Grid
      3. Displaying Data One Record at a Time
      4. Try It
      5. Exercises
    3. Lesson 35: Programming Databases, Part 2
      1. Searching
      2. Filtering
      3. Sorting
      4. Try It
      5. Exercises
    4. Lesson 36: LINQ to Objects
      1. LINQ Basics
      2. where Clauses
      3. Order By Clauses
      4. Select Clauses
      5. Try It
      6. Exercises
    5. Lesson 37: LINQ to SQL
      1. Connecting to the Database
      2. Making LINQ to SQL Classes
      3. Writing Code
      4. Using LINQ Queries
      5. Understanding Nullable Fields
      6. Understanding Query Execution
      7. Using LINQ to SQL with Access
      8. Try It
      9. Exercises
  9. Afterword: What's Next?
  10. End User License Agreement

Product information

  • Title: C# 24-Hour Trainer, 2nd Edition
  • Author(s): Rod Stephens
  • Release date: November 2015
  • Publisher(s): Wrox
  • ISBN: 9781119065661