Core C# and .NET (Paperback)

Stephen C. Perry

  • 出版商: Prentice Hall
  • 出版日期: 2005-09-16
  • 定價: $1,800
  • 售價: 2.2$399
  • 語言: 英文
  • 頁數: 1008
  • 裝訂: Paperback
  • ISBN: 0131472275
  • ISBN-13: 9780131472273
  • 相關分類: .NETC#

立即出貨(限量) (庫存=7)

買這商品的人也買了...

相關主題

商品描述

Table of Contents:

About the Author.

Foreword.

Preface.

Acknowledgments.

I. FUNDAMENTALS OF C# PROGRAMMING AND INTRODUCTION TO .NET.

1. Introduction to .NET and C#.

    Overview of the .NET Framework

      Microsoft .NET and the CLI Standards

    Common Language Runtime

      Compiling .NET Code

      Common Type System

      Assemblies

    Framework Class Library

    Working with the .NET Framework and SDK

      Updating the .NET Framework

      .NET Framework Tools

      Ildasm.exe

      wincv.exe

      Framework Configuration Tool

    Understanding the C# Compiler

      Locating the Compiler

      Compiling from the Command Line

    Summary

    Test Your Understanding

2. C# Language Fundamentals.

    The Layout of a C# Program

      General C# Programming Notes

    Primitives

      decimal

      bool

      char

      byte, sbyte

      short, int, long

      single, double

      Using Parse and TryParse to Convert a Numeric String

    Operators: Arithmetic, Logical, and Conditional

      Arithmetic Operators

      Conditional and Relational Operators

      Control Flow Statements

      if-else

      switch

    Loops

      while loop

      do loop

      for loop

      foreach loop

      Transferring Control Within a Loop

    C# Preprocessing Directives

      Conditional Compilation

      Diagnostic Directives

      Code Regions

    Strings

      String Literals

      String Manipulation

    Enumerated Types

      Working with Enumerations

      System.Enum Methods

      Enums and Bit Flags

    Arrays

      Declaring and Creating an Array

      Using System.Array Methods and Properties

    Reference and Value Types

      System.Object and System.ValueType

      Memory Allocation for Reference and Value Types

      Boxing

      Summary of Value and Reference Type Differences

    Summary

    Test Your Understanding

3. Class Design in C#.

    Introduction to a C# Class

    Defining a Class

      Attributes

      Access Modifiers

      Abstract, Sealed, and Static Modifiers

      Class Identifier

      Base Classes, Interfaces, and Inheritance

    Overview of Class Members

      Member Access Modifiers

    Constants, Fields, and Properties

      Constants

      Fields

      Properties

      Indexers

    Methods

      Method Modifiers

      Passing Parameters

    Constructors

      Instance Constructor

      Private Constructor

      Static Constructor

    Delegates and Events

      Delegates

      Delegate-Based Event Handling

    Operator Overloading

    Interfaces

      Creating and Using a Custom Interface

      Working with Interfaces

    Generics

    Structures

      Defining Structures

      Using Methods and Properties with a Structure

    Structure Versus Class

      Structures Are Value Types and Classes Are Reference Types

      Unlike a Class, a Structure Cannot Be Inherited

      General Rules for Choosing Between a Structure and a Class

    Summary

    Test Your Understanding

4. Working with Objects in C#.

    Object Creation

      Example: Creating Objects with Multiple Factories

    Exception Handling

      System.Exception Class

      Writing Code to Handle Exceptions

      Example: Handling Common SystemException Exceptions

      How to Create a Custom Exception Class

      Unhandled Exceptions

      Exception Handling Guidelines

    Implementing System.Object Methods in a Custom Class

      ToString() to Describe an Object

      Equals() to Compare Objects

      Cloning to Create a Copy of an Object

    Working with .NET Collection Classes and Interfaces

      Collection Interfaces

      System.Collections Namespace

      Stack and Queue

      ArrayList

      Hashtable

      System.Collections.Generic Namespace

    Object Serialization

      Binary Serialization

    Object Life Cycle Management

      .NET Garbage Collection

    Summary

    Test Your Understanding

II. CREATING APPLICATIONS USING THE .NET FRAMEWORK CLASS LIBRARY.

5. C# Text Manipulation and File I/O.

    Characters and Unicode

      Unicode

      Working with Characters

    The String Class

      Creating Strings

      Overview of String Operations

    Comparing Strings

      Using String.Compare

      Using String.CompareOrdinal

    Searching, Modifying, and Encoding a String's Content

      Searching the Contents of a String

      Searching a String That Contains Surrogates

      String Transformations

      String Encoding

    StringBuilder

      StringBuilder Class Overview

      StringBuilder Versus String Concatenation

    Formatting Numeric and DateTime Values

      Constructing a Format Item

      Formatting Numeric Values

      Formatting Dates and Time

    Regular Expressions

      The Regex Class

      Creating Regular Expressions

      A Pattern Matching Example

      Working with Groups

      Examples of Using Regular Expressions

    System.IO: Classes to Read and Write Streams of Data

      The Stream Class

      FileStreams

      MemoryStreams

      BufferedStreams

      Using StreamReader and StreamWriter to Read and Write Lines of Text

      StringWriter and StringReader

      Encryption with the CryptoStream Class

    System.IO: Directories and Files

      FileSystemInfo

      Working with Directories Using the DirectoryInfo, Directory, and Path Classes

      Working with Files Using the FileInfo and File Classes

    Summary

    Test Your Understanding

6. Building Windows Forms Applications.

    Programming a Windows Form

      Building a Windows Forms Application by Hand

    Windows.Forms Control Classes

      The Control Class

      Working with Controls

      Control Events

    The Form Class

      Setting a Form's Appearance

      Setting Form Location and Size

      Displaying Forms

      The Life Cycle of a Modeless Form

      Forms Interaction--A Sample Application

      Owner and Owned Forms

      Message and Dialog Boxes

      Multiple Document Interface Forms

    Working with Menus

      MenuItem Properties

      Context Menus

    Adding Help to a Form

      ToolTips

      Responding to F1 and the Help Button

      The HelpProvider Component

    Forms Inheritance

      Building and Using a Forms Library

      Using the Inherited Form

    Summary

    Test Your Understanding

7. Windows Forms Controls.

    A Survey of .NET Windows Forms Controls

    Button Classes, Group Box, Panel, and Label

      The Button Class

      The CheckBox Class

      The RadioButton Class

      The GroupBox Class

      The Panel Class

      The Label Class

    PictureBox and TextBox Controls

      The PictureBox Class

      The TextBox Class

    ListBox, CheckedListBox, and ComboBox Classes

      The ListBox Class

      Other List Controls: the ComboBox and the CheckedListBox

    The ListView and TreeView Classes

      The ListView Class

      The TreeView Class

    The ProgressBar, Timer, and StatusStrip Classes

      Building a StatusStrip

    Building Custom Controls

      Extending a Control

      Building a Custom UserControl

      A UserControl Example

      Using the Custom User Control

      Working with the User Control at Design Time

    Using Drag and Drop with Controls

      Overview of Drag and Drop

    Using Resources

      Working with Resource Files

      Using Resource Files to Create Localized Forms

    Summary

    Test Your Understanding

8. .NET Graphics Using GDI+.

    GDI+ Overview

      The Graphics Class

      The Paint Event

    Using the Graphics Object

      Basic 2-D Graphics

      Pens

      Brushes

      Colors

      A Sample Project: Building a Color Viewer

    Images

      Loading and Storing Images

      Manipulating Images

      Sample Project: Working with Images

      A Note on GDI and BitBlt for the Microsoft Windows Platform

    Summary

    Test Your Understanding

9. Fonts, Text, and Printing.

    Fonts

      Font Families

      The Font Class

    Drawing Text Strings

      Drawing Multi-Line Text

      Formatting Strings with the StringFormat Class

      Using Tab Stops

      String Trimming, Alignment, and Wrapping

    Printing

      Overview

      PrintDocument Class

      Printer Settings

      Page Settings

      PrintDocument Events

      PrintPage Event

      Previewing a Printed Report

      A Report Example

      Creating a Custom PrintDocument Class

    Summary

    Test Your Understanding

10. Working with XML in .NET.

    Working with XML

      Using XML Serialization to Create XML Data

      XML Schema Definition (XSD)

      Using an XML Style Sheet

    Techniques for Reading XML Data

      XmlReader Class

      XmlNodeReader Class

      The XmlReaderSettings Class

      Using an XML Schema to Validate XML Data

      Options for Reading XML Data

    Techniques for Writing XML Data

    Using XPath to Search XML

      Constructing XPath Queries

      XmlDocument and Xpath

      XPathDocument and Xpath

      XmlDataDocument and Xpath

    Summary

    Test Your Understanding

11. ADO.NET.

    Overview of the ADO.NET Architecture

      OLE DB Data Provider in .NET

      .NET Data Provider

    Data Access Models: Connected and Disconnected

      Connected Model

      Disconnected Model

    ADO.NET Connected Model

      Connection Classes

      The Command Object

      DataReader Object

    DataSets, DataTables, and the Disconnected Model

      The DataSet Class

      DataTables

      Loading Data into a DataSet

      Using the DataAdapter to Update a Database

      Defining Relationships Between Tables in a DataSet

      Choosing Between the Connected and Disconnected Model

    XML and ADO.NET

      Using a DataSet to Create XML Data and Schema Files

      Creating a DataSet Schema from XML

      Reading XML Data into a DataSet

    Summary

    Test Your Understanding

12. Data Binding with Windows Forms Controls.

    Overview of Data Binding

      Simple Data Binding

      Complex Data Binding with List Controls

      One-Way and Two-Way Data Binding

      Using Binding Managers

    Using Simple and Complex Data Binding in an Application

      Binding to a DataTable

      Binding Controls to an ArrayList

      Adding an Item to the Data Source

      Identifying Updates

      Update Original Database with Changes

    The DataGridView Class

      Properties

      Events

      Setting Up Master-Detail DataGridViews

      Virtual Mode

    Summary

    Test Your Understanding

III. ADVANCED USE OF C# AND THE .NET FRAMEWORK.

13. Asynchronous Programming and Multithreading.

    What Is a Thread?

      Multithreading

    Asynchronous Programming

      Asynchronous Delegates

      Examples of Implementing Asynchronous Calls

    Working Directly with Threads

      Creating and Working with Threads

      Multithreading in Action

      Using the Thread Pool

      Timers

    Thread Synchronization

      The Synchronization Attribute

      The Monitor Class

      The Mutex

      The Semaphore

      Avoiding Deadlock

      Summary of Synchronization Techniques

    Summary

    Test Your Understanding

14. Creating Distributed Applications with Remoting.

    Application Domains

      Advantages of AppDomains

      Application Domains and Assemblies

      Working with the AppDomain Class

    Remoting

      Remoting Architecture

      Types of Remoting

      Client-Activated Objects

      Server-Activated Objects

      Type Registration

      Remoting with a Server-Activated Object

      Remoting with a Client-Activated Object (CAO)

      Design Considerations in Creating a Distributed Application

    Leasing and Sponsorship

      Leasing

      Sponsorship

    Summary

    Test Your Understanding

15. Code Refinement, Security, and Deployment.

    Following .NET Code Design Guidelines

      Using FxCop

    Strongly Named Assemblies

      Creating a Strongly Named Assembly

      Delayed Signing

      Global Assembly Cache (GAC)

      Versioning

    Security

      Permissions and Permission Sets

      Evidence

      Security Policies

      Configuring Security Policy

      The .NET Framework Configuration Tool

      Configuring Code Access Security with the Configuration Tool--An Example

      Requesting Permissions for an Assembly

      Programmatic Security

    Application Deployment Considerations

      Microsoft Windows Deployment: XCOPY Deployment Versus the Windows Installer

      Deploying Assemblies in the Global Assembly Cache

      Deploying Private Assemblies

      Using CodeBase Configuration

      Using a Configuration File to Manage Multiple Versions of an Assembly

      Assembly Version and Product Information

    Summary

    Test Your Understanding

IV. PROGRAMMING FOR THE INTERNET.

16. ASP.NET Web Forms and Controls.