Table of Contents

Introduction

Part I    C# 2.0 Fundamentals

1    Introduction to C# 2.0

What Is the .NET Framework?

The Evolution of .NET

The Common Language Runtime

The Common Type System

Taking Out the Trash: Coding in a Garbage-Collected Environment

Working with Variables in C# 2.0

Common .NET Types

Type Shortcuts

Value Types vs. Reference Types

C# Basic Syntax

Code Blocks

The Canonical “Hello World” Sample

What You Can Do with C#

Summary

2    Expressions and Control Structures

Branching and Conditional Logic

Introduction to Boolean Expressions

Using Basic Conditional Statements

Using Advanced Conditional Statements

Looping and Repetition

Using the for Loop

Using the while Loop

Using the do Loop

Summary

3    Strings and Regular Expressions

Working with Strings

Introduction to the .NET String

Formatting Strings

Manipulating and Comparing Strings

Introduction to the StringBuilder

Working with Regular Expressions

Validating Input

Extracting Data from Input

Summary

4    Arrays and Collections

Working with Arrays

Declaring and Initializing Arrays

Using One-Dimensional Arrays

Using Multidimensional Arrays

Using Jagged Arrays

Working with Collections

Comparing Arrays and Collections

Using the ArrayList

Using the Hashtable

Using the Queue

Using the Stack

Using the SortedList

Summary

5    Object-Oriented Programming in C#

Object-Oriented Design

Introduction to Object-Oriented Design

Designing Classes

Designing Interfaces

Object-Oriented Programming

Creating Simple Classes

Handling Member Visibility

Using Object Inheritance

Introduction to Polymorphism

Implementing Interfaces

Summary

6    Introduction to Generics

Overview of Generics

Benefits of Generics

Introduction to Type Parameters

Constraining Type Parameters

Building Generic Types

Creating Generic Classes

Creating Generic Methods

Creating Generic Interfaces

Using Generic Collections

Using the Dictionary Class

Using the List Class

Using the Queue Class

Using the Stack Class

Summary

Part II    .NET Framework 2.0 Fundamentals

7    I/O and Persistence

Introduction to Streams

Using Memory Streams

Introduction to Basic File I/O

Creating and Appending Files

Reading from Existing Files

Using Directories and the File System

Using Asynchronous File I/O

Working with Isolated Storage

Summary

8    Working with XML

Reading and Writing XML Documents

Querying XML with XPath

Transforming Documents with XSLT

Validating Documents with XSD

Summary

9    Events and Delegates

Introduction to Delegates

Covariance and Contravariance

Using Anonymous Methods

Creating Multicast Delegates

Introduction to Events

Advanced Event-Based Programming

Summary

10    Multithreaded Programming

The Basics of Threaded Programming

Writing Your First Multithreaded Application

Creating and Running a Thread

Terminating a Thread

Suspending a Thread

Sleeping a Thread

Joining a Thread

Dealing with Thread Synchronization and Contention

Using the lock Keyword

Using Mutexes

Using Monitors

Using the Interlocked Class

Using the ReaderWriterLock Class

Working with Manual and Auto Reset Events

Using the ThreadPool Class

Summary

11    Reflection Fundamentals

Introduction to Reflection

Working with Method Information

Working with Member Information

Examining Events

Creating and Examining Custom Code Attributes

Summary

12    Assemblies and AppDomains

Introduction to Assemblies

Assemblies Under the Hood

Introducing the Assembly Manifest

Building and Using Assemblies

Storing and Retrieving Assembly Resources

Localization and Satellite Assemblies

Introduction to AppDomains

Programming with AppDomains

Summary

13    COM and Windows Interoperability

Introduction to Interoperability in C#

Using COM Objects from the .NET Framework

Using Primary InterOp Assemblies

Using .NET Classes from COM

Accessing Code in Unmanaged DLLs

Summary

14    Code Access Security

Introduction to Code Access Security (CAS)

Using and Administering Security Policy

Code Access Security Administration

Using Imperative Security

Enforcing Identity Imperatively

Using Declarative Security

Summary

15    Cryptography and Data Protection

Introduction to Cryptography

Secret-Key Encryption

Public-Key Encryption

Hashing

Digital Signatures

Using Secret-Key Encryption

Using Public-Key Encryption

Working with Hashes and Digital Signatures

Using the Data Protection API (DPAPI)

Summary

16    Optimizing Your .NET 2.0 Code

Understanding Boxing and Unboxing

Using Proper String Manipulation Techniques

Efficient Loop Construction

Speeding Up Application Start Times

Code Profiling Using the Performance Wizard

Summary

Part III    Data Access with .NET 2.0

17    ADO.NET Fundamentals

Introduction to ADO.NET

Establishing a Connection

Building a Connection String

Using the DbConnection Classes

Communicating with the Data Source

Executing Commands

Using DataReaders

Using Schema Discovery

Working with the Data

Introduction to the DataSet

Using a DataAdapter

Summary

18    Advanced ADO.NET Techniques

Working with the New Improved DataTable

Loading and Saving DataTables Using XML

Using the New DataTableReader Class

Accessing Data Asynchronously

Updating Data in Batches

Using the New System.Transactions Namespace

Using Explicit Transactions

Using Implicit Transactions

Summary

19    Working with ADO.NET Data Providers

Introduction to ADO.NET Data Providers

Using Provider Factories

Obtaining the List of Installed Provider Factories

Using a Provider Factory to Establish a Connection

Working with Connection Strings

Enumerating Data Sources

Obtaining Additional Provider Information

Using the RetrieveStatistics Method

Obtaining Schema Information from Data Providers

Creating a Custom ADO.NET Data Provider

Summary

20    Strongly Typed DataSets

Introduction to the Typed DataSet

Using an XSD Schema to Create a Typed DataSet

Using the Designer to Build a Typed DataSet

Programming with a Typed DataSet

Connecting Typed DataSets to Live Data

Filling a DataSet Manually Using a DataAdapter

Filling Typed DataSets Using TableAdapters

Adding Additional Queries to a Typed DataSet

Annotating a Typed DataSet

Extending a Typed DataSet Using Partial Classes

Summary

21    Programming with SQL Server 2005

Introduction to the SQL Server 2005 CLR Host

Building C# Stored Procedures

Building C# User-Defined Functions

Creating a C# User-Defined Type

Working with the New Server-Side SQL Library

Using MARS (Multiple Active RecordSets)

Summary

Part IV    Developing ASP.NET 2.0 Web Applications

22    Introduction to ASP.NET 2.0 and Web Forms

Introduction to ASP.NET 2.0

Page and Control Hierarchy

Introduction to the ASP.NET 2.0 Compiler

Security

State Management

The Web Configuration System

Understanding the ASP.NET Page Life Cycle

Stages of ASP.NET Page Rendering

ASP.NET Page Life Cycle Events

Overview of Controls Provided by ASP.NET

Creating and Debugging ASP.NET Applications

Building and Deploying ASP.NET Applications

Debugging ASP.NET Applications

Handling Events and Postbacks

Building Interactive Dynamic Pages Using Client Callbacks

Summary

23    State Management in ASP.NET 2.0

Working with Application State

Working with Session State

Using the Default In-Process State Provider

Using the ASP.NET State Server Provider

Using the SQL Server Session State Provider

Handling Session State Events

Working with View State

State Management in Web Farms

Using Application State in Web Farms

Using Session State in Web Farms

Using View State in Web Farms

Summary

24    Using Master Pages

The World Before Master Pages

The Need for a Consistent GUI

Creating a Consistent GUI in ASP.NET 1.1

Introduction to Master Pages

Master Pages and Content Pages

Creating Your First Master Page

Creating Your First Content Page

Using a Default Master Page

Master Pages “Under the Hood”

Advanced Master Pages Techniques

Nested Master Pages

The “Master” Property

Strongly Typed Master Pages

Handling Relative Paths

Summary

25    ASP.NET Personalization and Customization

User Interface Tailoring with Themes and Skins

Working with ASP.NET User Profiles

Configure Application Services

Configuring the Profile Provider

Using ASP.NET Profiles

User Customization with Themes and Profiles

Summary

26    Introduction to Web Parts

Web Part Basics

Using a Personalization Provider

Building Your First Web Part Page

Creating Web Parts

Building Connected Web Parts

Summary

27    Building Rich, Data-Driven Web Applications

Introduction to Data Binding in ASP.NET

The Data Source Model

Creating Data Sources

Data-Bound Control Hierarchy

Using Data-Bound Controls

Using the GridView Control

Using the DetailsView Control

Using the FormView Control

Using the TreeView

Advanced Data-Binding Techniques

Creating and Utilizing an Object Data Source

Summary

28    Securing Your ASP.NET Applications

Security Through Authentication

Windows Authentication

Passport Authentication

Forms Authentication

User Management with Membership

Security Through Authorization

Authorization with Roles

The ASP.NET Security Controls

Login

LoginName

LoginStatus

LoginView

PasswordRecovery

ChangePassword

CreateUserWizard

Advanced ASP.NET Security

Using Protected Configuration Settings

Summary

29    Creating Custom ASP.NET Providers

The Membership Provider

Introduction to the MembershipProvider Base Class

Implementing a Membership Schema

Creating a Custom Membership Provider

Configuring and Installing the Membership Provider

The Role Provider

Introduction to the RoleProvider Base Class

Implementing a Role Schema

Creating a Custom Role Provider

Configuring and Installing the Role Provider

The ProfileProvider

Introduction to the ProfileProvider Base Class

Implementing a Profile Schema

Creating a Custom Profile Provider

Configuring and Installing the Profile Provider

Additional Providers

Introduction to the SessionState Provider

Introduction to the SiteMap Provider

Summary

30    Developing ASP.NET Controls

Building User Controls

Creating Server Controls

Managing State Within Server Controls

Summary

31    ASP.NET Management and Monitoring

Introducing the New Health Monitoring System

Using the Health Monitoring System

Creating Custom Events

Creating Custom Event Providers

Using ASP.NET Performance Counters

Summary

Part V    Web Services

32    Exposing Functionality with Web Services

Introduction to Web Services

How Web Services Work

Creating a Simple “Hello World” Service

Creating Transactional Services

Managing State in Web Services

Summary

33    Advanced Web Services Programming

Designing for Service-Oriented Architectures (SOA)

Loose Coupling and Dependencies

SOA as a Way of Life

Using Web Service Discovery

Using Custom SOAP Headers

Programming Secure Web Services

Data-Binding Windows Forms to Web Services

Summary

Part VI    Developing Windows Forms 2.0 Applications

34    Introduction to Windows Forms 2.0

Windows Forms Basics

Windows Forms Versus Web Forms

Creating a Windows Forms Application

Using the Windows Forms Designer

Using the Document Outline Window

Lining Up Controls with SnapLines

Creating Resizable Forms

Elements of Good User Interface Design

Design with Colors

Size Awareness in Design

Complexity in Design

Click Count Awareness in Design

Design Intuitiveness

Summary

35    The Windows Forms Control Library

The Common Controls Toolbox

The Button Control

The CheckBox Control

The CheckedListBox Control

The ComboBox Control

The DateTimePicker Control

The Label Control

The LinkLabel Control

The ListBox Control

The ListView Control

The MaskedTextBox Control

The MonthCalendar Control

The NotifyIcon Control

The NumericUpDown Control

The PictureBox Control

The ProgressBar Control

The RadioButton Control

The TextBox Control

The RichTextBox Control

The ToolTip Control

The TreeView Control

The WebBrowser Control

Containers

The FlowLayoutPanel Control

The GroupBox Control

The Panel Control

The SplitContainer Control

The TabControl Control

The TableLayoutPanel Control

Menus and Toolbars

The ContextMenuStrip Control

The MenuStrip Control

The StatusStrip Control

The ToolStrip Control

The ToolStripContainer Control

The Data-Related Controls

The DataSet Control

The DataGridView Control

The BindingSource Control

The BindingNavigator Control

The ReportViewer Control

The Components Toolbox Group

The BackgroundWorker Component

The DirectoryEntry Component

The DirectorySearcher Component

The ErrorProvider Component

The EventLog Component

The FileSystemWatcher Component

The HelpProvider Component

The ImageList Component

The MessageQueue Component

The PerformanceCounter Component

The Process Component

The SerialPort Component

The ServiceController Component

The Timer Component

Components and Controls for Printing

The PageSetupDialog Component

The PrintDialog Component

The PrintDocument Component

The PrintPreviewControl Component

The PrintPreviewDialog Component

Dialog Components

The ColorDialog Component

The FolderBrowserDialog Component

The FontDialog Component

The OpenFileDialog Component

The SaveFileDialog Component

Summary

36    Advanced User Interface Programming

Introduction to GDI+

Obtaining a Graphics Object

Creating a “Hello GDI+” Sample

Drawing and Filling Shapes

Using a Gradient Brush

Creating Shaped Forms and Controls

Using Visual Inheritance

Globalizing Your User Interface

Summary

37    Data Binding with Windows Forms 2.0

Binding with Typed DataSets

Using the Data Sources Window

Adding a DataSet to a Form

Typed DataSet Binding Sample

Introducing the BindingSource

Using the BindingNavigator

BindingNavigator Basics

User-Triggered Binding Actions

Working with the DataGridView

DataGridView Basics

Using a ComboBox Column in a DataGridView

Advanced Cell Customization

The DataGridView “Unbound”

Data Binding with Objects

Object Data-Binding Basics

Using the IEditableObject and INotifyPropertyChanged Interfaces

Parent-Detail Binding

Summary

38    Developing Smart Clients

Practical Web Service Consumption

Obtaining a Web Service URL from UDDI

Using the New Application Settings System

Supporting Offline and Online Operation

Authorizing and Authenticating Users

Multithreaded Web Service Consumption

Using the BackgroundWorker Control

Summary

39    Deploying Applications Using ClickOnce

Introduction to ClickOnce

Publishing ClickOnce Applications

Deployment over the Web or Network Share

Deployment on CD

Application Launched Directly from Web or Share

Deploying a ClickOnce Application

Updating ClickOnce Applications

Programming with the System.Deployment.Application Namespace

Summary

40    Using Enterprise Services

Registering Serviced Components

Manual Registration

Automatic Registration

Just-in-Time Activation and Pooling

Queued Components

Role-Based Security

Transactions

Shared Properties

Loosely Coupled Events

Summary

Part VII    Developing Enterprise and Distributed Applications

41    Remoting

Overview of Remoting

Introduction to the MarshalByRefObject Class

Single Call Versus Singleton Objects

Working with Remoting Channels

Using the IPC Channel

Using the TCP Channel

Working with Lifetime Leases

Remoting with Generics

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.102.189