Sams Teach Yourself C#™ in 24 Hours

Book description

Sams Teach Yourself C# in 24 Hours provides readers with 24 structured lessons that provide a light, but thorough introduction to C#. James Foxall moves beyond the pure syntax covered in existing books, to guide readers step-by-step through a cohesive presentation of the basics of C#. Once the basics are understood, Foxall shows the reader how to apply this knowledge to real-world Windows programming tasks using C#. Each chapter contains exercises that reinforce the lessons learned in each chapter. Tips, Notes, and Cautions provide additional advice from the authors on how to get up to speed and programming quickly with C#. Sidebars provide the more experienced reader with tips that will ease their migration from Visual Basic 6 and Visual C++ to C#.

Table of contents

  1. Copyright
  2. About the Authors
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Introduction
  6. The Visual Studio Environment
    1. A C# Programming Tour
      1. Starting C#
      2. Creating a New Project
      3. Understanding the C# Environment
      4. Changing the Characteristics of Objects
      5. Naming Objects
      6. Setting the Text Property of the Form
      7. Giving the Form an Icon
      8. Changing the Size of the Form
      9. Adding Controls to a Form
      10. Designing an Interface
      11. Adding an Invisible Control to a Form
      12. Coding an Interface
      13. Running a Project
      14. Summary
      15. Q&A
      16. Workshop
    2. Navigating C#
      1. Using the Visual Studio .NET Start Page
      2. Navigating and Customizing the C# Environment
      3. Adding Controls to a Form Using the Toolbox
      4. Setting Object Properties Using the Properties Window
      5. Managing Projects
      6. Managing Project Files with the Solution Explorer
      7. Getting Help
      8. Summary
      9. Q&A
      10. Workshop
    3. Understanding Objects and Collections
      1. Understanding Objects
      2. Understanding Properties
      3. Understanding Methods
      4. Building an Object Example Project
      5. Understanding Collections
      6. Using the Object Browser
      7. Summary
      8. Q&A
      9. Workshop
    4. Understanding Events
      1. Understanding Event-Driven Programming
      2. Building an Event Example Project
      3. Summary
      4. Q&A
      5. Workshop
  7. Building a User Interface
    1. Building Forms—Part I
      1. Changing the Name of a Form
      2. Changing the Appearance of a Form
      3. Showing and Hiding Forms
      4. Summary
      5. Q&A
      6. Workshop
    2. Building Forms—Part II
      1. Working with Controls
      2. Creating TopMost Windows
      3. Creating Transparent Forms
      4. Creating Scrollable Forms
      5. Creating MDI Forms
      6. Setting the Startup Object
      7. Summary
      8. Q&A
      9. Workshop
    3. Working with the Traditional Controls
      1. Displaying Static Text with the Label Control
      2. Allowing Users to Enter Text Using a Text Box
      3. Creating Buttons
      4. Creating Containers and Groups of Option Buttons
      5. Displaying a List with the List Box
      6. Creating Drop-Down Lists Using the Combo Box
      7. Summary
      8. Q&A
      9. Workshop
    4. Advanced Controls
      1. Creating Timers
      2. Creating Tabbed Dialog Boxes
      3. Storing Pictures in an Image List
      4. Building Enhanced Lists Using the List View
      5. Creating Hierarchical Lists with the Tree View
      6. Summary
      7. Q&A
      8. Workshop
    5. Adding Menus and Toolbars to Forms
      1. Building Menus
      2. Programming Menus
      3. Using the Toolbar Control
      4. Creating a Status Bar
      5. Summary
      6. Q&A
      7. Workshop
    6. Drawing and Printing
      1. Understanding the Graphics Object
      2. Working with Pens
      3. Using System Colors
      4. Working with Rectangles
      5. Drawing Shapes
      6. Drawing Text
      7. Persisting Graphics on a Form
      8. Build a Graphics Project Example
      9. Summary
      10. Q&A
      11. Workshop
  8. Making Things Happen—Programming!
    1. Creating and Calling Methods
      1. Creating Class Members
      2. Writing Methods
      3. Creating the User Interface of Your Project
      4. Calling Methods
      5. Exiting Methods
      6. Working with Tasks
      7. Summary
      8. Q&A
      9. Workshop
    2. Using Constants, Data Types, Variables, and Arrays
      1. Understanding Data Types
      2. Defining and Using Constants
      3. Declaring and Referencing Variables
      4. Determining Scope
      5. Naming Conventions
      6. Summary
      7. Q&A
      8. Workshop
    3. Performing Arithmetic, String Manipulation, and Date/Time Adjustments
      1. Performing Basic Arithmetic
      2. Comparing Equalities
      3. Understanding Boolean Logic
      4. Manipulating Strings
      5. Working with Dates and Times
      6. Summary
      7. Q&A
      8. Workshop
    4. Making Decisions in C# Code
      1. Making Decisions Using if Statements
      2. Evaluating an Expression for Multiple Values Using switch
      3. Branching Within Code Using goto
      4. Summary
      5. Q&A
      6. Workshop
    5. Looping for Efficiency
      1. Looping a Specific Number of Times Using for Statements
      2. Using do…while to Loop an Indeterminate Number of Times
      3. Summary
      4. Q&A
      5. Workshop
    6. Debugging Your Code
      1. Adding Comments to Your Code
      2. Identifying the Two Basic Types of Errors
      3. Using C#'s Debugging Tools
      4. Writing an Error Handler Using try...catch...finally
      5. Summary
      6. Q&A
      7. Workshop
    7. Designing Objects Using Classes
      1. Understanding Classes
      2. Instantiating Objects from Classes
      3. Summary
      4. Q&A
      5. Workshop
    8. Interacting with Users
      1. Displaying Messages Using the MessageBox.Show() Method
      2. Creating Custom Dialog Boxes
      3. Interacting with the Keyboard
      4. Using the Common Mouse Events
      5. Summary
      6. Q&A
      7. Workshop
  9. Working with Data
    1. Performing File Operations
      1. Using the Open File Dialog and Save File Dialog Controls
      2. Manipulating Files with the File Object
      3. Manipulating Directories with the Directory Object
      4. Summary
      5. Q&A
      6. Workshop
    2. Controlling Other Applications Using Automation
      1. Creating a Reference to an Automation Library
      2. Creating an Instance of an Automation Server
      3. Manipulating the Server
      4. Summary
      5. Q&A
      6. Workshop
    3. Working with a Database
      1. Introduction to ADO.NET
      2. Connecting to a Database
      3. Manipulating Data
      4. Using the Data Form Wizard
      5. Summary
      6. Q&A
      7. Workshop
  10. Deploying Solutions and Beyond
    1. Deploying a Solution
      1. Creating a Custom Setup Program
      2. Running a Custom Setup Program
      3. Uninstalling an Application You've Distributed
      4. Summary
      5. Q&A
      6. Workshop
    2. Introduction to Web Development
      1. XML
      2. SOAP
      3. ASP.NET
      4. Web Forms
      5. XML Web Services
      6. Summary
      7. Q&A
      8. Workshop
    3. The 10,000-Foot View
      1. The .NET Framework
      2. Common Language Runtime (CLR)
      3. Microsoft Intermediate Language
      4. Namespaces
      5. Common Type System
      6. Garbage Collection
      7. Summary
      8. Q&A
      9. Workshop
    4. Answers to Quizzes/Exercises
      1. Answers to Hour 1
      2. Answers to Hour 2
      3. Answers to Hour 3
      4. Answers to Hour 4
      5. Answers to Hour 5
      6. Answers to Hour 6
      7. Answers to Hour 7
      8. Answers to Hour 8
      9. Answers for Hour 9
      10. Answers to Hour 10
      11. Answers to Hour 11
      12. Answers to Hour 12
      13. Answers to Hour 13
      14. Answers to Hour 14
      15. Answers to Hour 15
      16. Answers to Hour 16
      17. Answers to Hour 17
      18. Answers to Hour 18
      19. Answers for Hour 19
      20. Answers to Hour 20
      21. Answers to Hour 21
      22. Answers to Hour 22
      23. Answers for Hour 23
      24. Answers for Hour 24
  11. Index

Product information

  • Title: Sams Teach Yourself C#™ in 24 Hours
  • Author(s): James Foxall, Wendy Haro-Chun
  • Release date: March 2002
  • Publisher(s): Sams
  • ISBN: 0672322870