You are previewing Pro VB 2010 and the .NET 4 Platform.
O'Reilly logo
Pro VB 2010 and the .NET 4 Platform

Book Description

Be the first to understand .NET 4.0 and Visual Basic 2010. Pro VB 2010 and the .NET 4.0 Platform provides developers with a complete guide to the new technology, explaining the importance of all the key C# 2010 language features. This new edition has been comprehensively revised and rewritten to make it accurately reflect the VB 10 language specification for the .NET 4.0 platform. You'll find new chapters covering the important concepts of dynamic lookups, named and optional arguments, Parallel LINQ (PLINQ), improved COM interop, and variance for generics.

The first edition of this book was released at the 2001 Tech-Ed conference in Atlanta, Georgia. At that time, the .NET platform was still a beta product, and in many ways, so was this book. This is not to say that the early editions of this text did not have merit—after all, the book was a 2002 Jolt Award finalist and it won the 2003 Referenceware Excellence Award. However, over the years that author Andrew Troelsen spent working with the common language runtime (CLR), he gained a much deeper understanding of the .NET platform and the subtleties of the VB programming language, and he feels that this sixth edition of the book is as close to a "final release" as he's come yet!

If you're checking out this book for the first time, do understand that it's targeted at experienced software professionals and/or graduate students of computer science (so don't expect three chapters on iteration or decision constructs!). The mission of this text is to provide you with a rock-solid foundation in the C# programming language and the core aspects of the .NET platform (assemblies, remoting, Windows Forms, Web Forms, ADO.NET, XML web services, etc.). Once you digest the information presented in these 25 chapters, you'll be in a perfect position to apply this knowledge to your specific programming assignments and explore the .NET universe on your own terms.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. We're a Team, You and I
    2. An Overview of This Book
      1. Chapter 1: Introducing VB 2010
      2. Chapter 2: Building Visual Basic 2010 Applications
      3. Chapter 3: Core VB 2010 Programming Constructs, Part I
      4. Chapter 4: Core VB Programming Constructs, Part II
      5. Chapter 5: Defining Encapsulated Class Types
      6. Chapter 6: Understanding Inheritance and Polymorphism
      7. Chapter 7: Understanding Structured Exception Handling
      8. Chapter 8: Understanding Object Lifetime
      9. Chapter 9: Working with Interfaces
      10. Chapter 10: Understanding Generics
      11. Chapter 11: Delegates, Events, and Lambdas
      12. Chapter 12: Advanced VB 2010 Language Features
      13. Chapter 13: LINQ to Objects
      14. Chapter 14: Configuring .NET Assemblies
      15. Chapter 15: Type Reflection, Late Binding, and Attribute-Based Programming
      16. Chapter 16: Processes, AppDomains, and Object Contexts
      17. Chapter 17: Understanding CIL and the Role of Dynamic Assemblies
      18. Chapter 18: Dynamic Types and the Dynamic Language Runtime
      19. Chapter 19: Multithreaded and Parallel Programming
      20. Chapter 20: File I/O and Object Serialization
      21. Chapter 21: ADO.NET Part I: The Connected Layer
      22. Chapter 22: ADO.NET Part II: The Disconnected Layer
      23. Chapter 23: ADO.NET Part III: The Entity Framework
      24. Chapter 24: Introducing LINQ to XML
      25. Chapter 25: Introducing Windows Communication Foundation
      26. Chapter 26: Introducing Windows Workflow Foundation
      27. Chapter 27: Introducing Windows Presentation Foundation and XAML
      28. Chapter 28: Programming with WPF Controls
      29. Chapter 29: WPF Graphical Rendering Services
      30. Chapter 30: WPF Resources, Animations, and Styles
      31. Chapter 31: WPF Control Templates and UserControls
      32. Chapter 32: Building ASP.NET Web Pages
      33. Chapter 33: ASP.NET Web Controls, Master Pages, and Themes
      34. Chapter 34: ASP.NET State Management Techniques
      35. Appendix A: Programming with Windows Forms
      36. Appendix B: Platform-Independent .NET Development with Mono
    3. Obtaining This Book's Source Code
    4. Obtaining Updates for This Book
  6. 1. Introducing VB 2010
    1. 1.1. Understanding the Previous State of Affairs
      1. 1.1.1. Life As a C/Windows API Programmer
      2. 1.1.2. Life As a C++/MFC Programmer
      3. 1.1.3. Life As a Visual Basic 6.0 Programmer
      4. 1.1.4. Life As a Java Programmer
      5. 1.1.5. Life As a COM Programmer
        1. 1.1.5.1. The Complexity of COM Data Type Representation
    2. 1.2. The .NET Solution
    3. 1.3. Introducing the Building Blocks of the .NET Platform (the CLR, CTS, and CLS)
      1. 1.3.1. The Role of the Base Class Libraries
      2. 1.3.2. What Visual Basic 2010 Brings to the Table
    4. 1.4. Additional .NET-Aware Programming Languages
      1. 1.4.1. Life in a Multi-Language World
    5. 1.5. An Overview of .NET Assemblies
      1. 1.5.1. Single-File and Multi-File Assemblies
      2. 1.5.2. The Role of the Common Intermediate Language
        1. 1.5.2.1. Benefits of CIL
        2. 1.5.2.2. Compiling CIL to Platform-Specific Instructions
      3. 1.5.3. The Role of .NET Type Metadata
      4. 1.5.4. The Role of the Assembly Manifest
    6. 1.6. Understanding the Common Type System
      1. 1.6.1. CTS Class Types
      2. 1.6.2. CTS Interface Types
      3. 1.6.3. CTS Structure Types
      4. 1.6.4. CTS Enumeration Types
      5. 1.6.5. CTS Delegate Types
      6. 1.6.6. CTS Type Members
      7. 1.6.7. Intrinsic CTS Data Types
    7. 1.7. Understanding the Common Language Specification
      1. 1.7.1. Ensuring CLS Compliance
    8. 1.8. Understanding the Common Language Runtime
    9. 1.9. The Assembly/Namespace/Type Distinction
      1. 1.9.1. The Role of the Microsoft Root Namespace
      2. 1.9.2. Accessing a Namespace Programmatically
      3. 1.9.3. Referencing External Assemblies
    10. 1.10. Exploring an Assembly Using ildasm.exe
      1. 1.10.1. Viewing CIL Code
      2. 1.10.2. Viewing Type Metadata
      3. 1.10.3. Viewing Assembly Metadata (aka the Manifest)
    11. 1.11. Exploring an Assembly Using Reflector
    12. 1.12. Deploying the .NET Runtime
      1. 1.12.1. The .NET Client Profile Runtime
    13. 1.13. The Platform-Independent Nature of .NET
    14. 1.14. Summary
  7. 2. Building Visual Basic 2010 Applications
    1. 2.1. The Role of the .NET Framework 4.0 SDK
      1. 2.1.1. The Visual Studio 2010 Command Prompt
    2. 2.2. Building VB 2010 Applications Using vbc.exe
      1. 2.2.1. Specifying Input and Output Targets
      2. 2.2.2. Referencing External Assemblies
      3. 2.2.3. Referencing Multiple External Assemblies
      4. 2.2.4. Compiling Multiple Source Files
      5. 2.2.5. Working with VB 2010 Response Files
        1. 2.2.5.1. The Default Response File (vbc.rsp)
    3. 2.3. Building .NET Applications Using Notepad++
    4. 2.4. Building .NET Applications Using Visual Basic 2010 Express
      1. 2.4.1. Some Unique Features of Visual Basic 2010 Express
    5. 2.5. Building .NET Applications Using Visual Studio 2010
      1. 2.5.1. Some Unique Features of Visual Studio 2010
      2. 2.5.2. Targeting the .NET Framework Using the New Project Dialog Box
      3. 2.5.3. Using the Solution Explorer Utility
        1. 2.5.3.1. Referencing External Assemblies
        2. 2.5.3.2. Viewing Project Properties
      4. 2.5.4. The Class View Utility
      5. 2.5.5. The Object Browser Utility
      6. 2.5.6. Integrated Support for Code Refactoring
      7. 2.5.7. Code Expansions Techniques
      8. 2.5.8. The Visual Class Designer
      9. 2.5.9. The Integrated .NET Framework 4.0 SDK Documentation System
    6. 2.6. Summary
  8. 3. Core VB 2010 Programming Constructs, Part I
    1. 3.1. The Role of the Module Type
      1. 3.1.1. Projects with Multiple Modules
      2. 3.1.2. Modules Are Not Creatable
      3. 3.1.3. Renaming Your Initial Module
      4. 3.1.4. Members of Modules
    2. 3.2. The Anatomy of a Simple VB 2010 Program
      1. 3.2.1. Variations on the Main() Method
      2. 3.2.2. Specifying an Application Error Code
      3. 3.2.3. Processing Command-Line Arguments
      4. 3.2.4. Specifying Command-Line Arguments with Visual Studio 2010
    3. 3.3. An Interesting Aside: Some Additional Members of the System.Environment Class
    4. 3.4. The System.Console Class
      1. 3.4.1. Basic Input and Output with the Console Class
      2. 3.4.2. Formatting Console Output
      3. 3.4.3. Formatting Numerical Data
      4. 3.4.4. Formatting Numerical Data Beyond Console Applications
    5. 3.5. System Data Types and VB 2010 Shorthand Notation
      1. 3.5.1. Variable Declaration and Initialization
      2. 3.5.2. Intrinsic Data Types and the New Operator
      3. 3.5.3. The Data Type Class Hierarchy
      4. 3.5.4. Members of Numerical Data Types
      5. 3.5.5. Members of System.Boolean
      6. 3.5.6. Members of System.Char
      7. 3.5.7. Parsing Values from String Data
      8. 3.5.8. System.DateTime and System.TimeSpan
      9. 3.5.9. The .NET 4.0 System.Numerics Namespace
    6. 3.6. Working with String Data
      1. 3.6.1. Basic String Manipulation
      2. 3.6.2. String Concatenation
      3. 3.6.3. Special Character Constants
      4. 3.6.4. End SubStrings and Equality
      5. 3.6.5. Strings Are Immutable
      6. 3.6.6. The System.Text.StringBuilder Type
    7. 3.7. Narrowing and Widening Data Type Conversions
      1. 3.7.1. Trapping Narrowing Data Conversions
      2. 3.7.2. Understanding Option Strict
      3. 3.7.3. Setting Project-wide Overflow Checking
      4. 3.7.4. The Role of System.Convert
    8. 3.8. Understanding Implicitly Typed Local Variables
      1. 3.8.1. Restrictions on Implicitly Typed Variables
      2. 3.8.2. Implicit Typed Data Is Strongly Typed Data
      3. 3.8.3. Usefulness of Implicitly Typed Local Variables
    9. 3.9. VB 2010 Iteration Constructs
      1. 3.9.1. The For Loop
      2. 3.9.2. The For Each Loop
        1. 3.9.2.1. Use of Implicitly Typed Variables Within For Each Constructs
      3. 3.9.3. The While and Do/While Looping Constructs
    10. 3.10. Decision Constructs and the Relational/Equality Operators
      1. 3.10.1. The If/Then/Else Statement
      2. 3.10.2. The Select/Case Statement
    11. 3.11. Summary
  9. 4. Core VB 2010 Programming Constructs, Part II
    1. 4.1. Methods and Parameter Modifiers
      1. 4.1.1. The ByVal Parameter Modifier
      2. 4.1.2. The ByRef Modifier
      3. 4.1.3. The <Out()> Attribute
      4. 4.1.4. The ParamArray Modifier
      5. 4.1.5. Defining Optional Parameters
      6. 4.1.6. Invoking Methods using Named Parameters
      7. 4.1.7. Understanding Method Overloading
    2. 4.2. Understanding VB 2010 Arrays
      1. 4.2.1. VB 2010 Array Initialization Syntax
      2. 4.2.2. Implicitly Typed Local Arrays
      3. 4.2.3. Defining an Array of Objects
      4. 4.2.4. Working with Multidimensional Arrays
      5. 4.2.5. Arrays As Arguments or Return Values
      6. 4.2.6. The System.Array Base Class
    3. 4.3. Understanding the Enum Type
      1. 4.3.1. Controlling the Underlying Storage for an Enum
      2. 4.3.2. Declaring Enum Variables
      3. 4.3.3. The System.Enum Type
      4. 4.3.4. Dynamically Discovering an Enum's Name/Value Pairs
    4. 4.4. Understanding the Structure Type
      1. 4.4.1. Creating Structure Variables
    5. 4.5. Understanding Value Types and Reference Types
      1. 4.5.1. Value Types, References Types, and the Assignment Operator
      2. 4.5.2. Value Types Containing Reference Types
      3. 4.5.3. Passing Reference Types by Value
      4. 4.5.4. Passing Reference Types by Reference
      5. 4.5.5. Final Details Regarding Value Types and Reference Types
    6. 4.6. Understanding VB 2010 Nullable Types
      1. 4.6.1. Working with Nullable Types
      2. 4.6.2. The Nullable If Operator
    7. 4.7. Summary
  10. 5. Defining Encapsulated Class Types
    1. 5.1. Introducing the VB 2010 Class Type
      1. 5.1.1. Allocating Objects with the New Keyword
    2. 5.2. Understanding Constructors
      1. 5.2.1. The Role of the Default Constructor
      2. 5.2.2. Defining Custom Constructors
      3. 5.2.3. The Default Constructor Revisited
    3. 5.3. The Role of the Me Keyword
      1. 5.3.1. Chaining Constructor Calls Using Me
      2. 5.3.2. Observing Constructor Flow
      3. 5.3.3. Revisiting Optional Arguments
    4. 5.4. Understanding the Shared Keyword
      1. 5.4.1. Defining Shared Methods
      2. 5.4.2. Defining Shared Field Data
      3. 5.4.3. Defining Shared Constructors
      4. 5.4.4. Defining Modules in VB 2010
    5. 5.5. Defining the Pillars of OOP
      1. 5.5.1. The Role of Encapsulation
      2. 5.5.2. The Role of Inheritance
      3. 5.5.3. The Role of Polymorphism
    6. 5.6. VB 2010 Access Modifiers
      1. 5.6.1. The Default Access Modifiers
      2. 5.6.2. Access Modifiers and Nested Types
    7. 5.7. The First Pillar: VB 2010 Encapsulation Services
      1. 5.7.1. Encapsulation Using Traditional Accessors and Mutators
      2. 5.7.2. Encapsulation Using .NET Properties
      3. 5.7.3. Using Properties within a Class Definition
      4. 5.7.4. Internal Representation of Properties
      5. 5.7.5. Controlling Visibility Levels of Property Get/Set Statements
      6. 5.7.6. Read-Only and Write-Only Properties
      7. 5.7.7. Shared Properties
    8. 5.8. Understanding Automatic Properties
      1. 5.8.1. Interacting with Automatic Properties
      2. 5.8.2. Regarding Automatic Properties and Default Values
    9. 5.9. Understanding Object Initializer Syntax
      1. 5.9.1. Calling Custom Constructors with Initialization Syntax
      2. 5.9.2. Nested Objects
    10. 5.10. Working with Constant Field Data
      1. 5.10.1. Understanding Read-Only Fields
      2. 5.10.2. Shared Read-Only Fields
    11. 5.11. Understanding Partial Types
    12. 5.12. Summary
  11. 6. Understanding Inheritance and Polymorphism
    1. 6.1. The Basic Mechanics of Inheritance
      1. 6.1.1. Specifying the Parent Class of an Existing Class
      2. 6.1.2. Regarding Multiple Base Classes
      3. 6.1.3. The NotInheritable Keyword
    2. 6.2. Revising Visual Studio Class Diagrams
    3. 6.3. The Second Pillar of OOP: The Details of Inheritance
      1. 6.3.1. Controlling Base Class Creation with the MyBase Keyword
      2. 6.3.2. Keeping Family Secrets: The Protected Keyword
      3. 6.3.3. Adding a NotInheritable Class
    4. 6.4. Programming for Containment/Delegation
      1. 6.4.1. Understanding Nested Type Definitions
    5. 6.5. The Third Pillar of OOP: VB's Polymorphic Support
      1. 6.5.1. The Overridable and Overrides Keywords
      2. 6.5.2. Overriding Overridable Members Using Visual Studio 2010
      3. 6.5.3. NotOverridable Members
      4. 6.5.4. Understanding Abstract Classes and the MustInherit Keyword
      5. 6.5.5. Understanding the Polymorphic Interface
      6. 6.5.6. Understanding Member Shadowing
    6. 6.6. Understanding Base Class/Derived Class Casting Rules
      1. 6.6.1. The VB TryCast Keyword
      2. 6.6.2. The VB Is Keyword
    7. 6.7. The Master Parent Class: System.Object
      1. 6.7.1. Overriding System.Object.ToString()
      2. 6.7.2. Overriding System.Object.Equals()
      3. 6.7.3. Overriding System.Object.GetHashCode()
      4. 6.7.4. Testing Your Modified Person Class
      5. 6.7.5. The Shared Members of System.Object
    8. 6.8. Summary
  12. 7. Understanding Structured Exception Handling
    1. 7.1. Ode to Errors, Bugs, and Exceptions
    2. 7.2. The Role of .NET Exception Handling
      1. 7.2.1. The Atoms of .NET Exception Handling
      2. 7.2.2. The System.Exception Base Class
    3. 7.3. The Simplest Possible Example
      1. 7.3.1. Throwing a General Exception
      2. 7.3.2. Catching Exceptions
    4. 7.4. Configuring the State of an Exception
      1. 7.4.1. The TargetSite Property
      2. 7.4.2. The StackTrace Property
      3. 7.4.3. The HelpLink Property
      4. 7.4.4. The Data Property
    5. 7.5. System-Level Exceptions (System.SystemException)
    6. 7.6. Application-Level Exceptions (System.ApplicationException)
      1. 7.6.1. Building Custom Exceptions, Take One
      2. 7.6.2. Building Custom Exceptions, Take Two
      3. 7.6.3. Building Custom Exceptions, Take Three
    7. 7.7. Processing Multiple Exceptions
      1. 7.7.1. General Catch Statements
      2. 7.7.2. Rethrowing Exceptions
      3. 7.7.3. Inner Exceptions
      4. 7.7.4. The Finally Block
    8. 7.8. Who Is Throwing What?
    9. 7.9. The Result of Unhandled Exceptions
    10. 7.10. Debugging Unhandled Exceptions Using Visual Studio
    11. 7.11. A Brief Word Regarding Corrupted State Exceptions (CSE)
    12. 7.12. Summary
  13. 8. Understanding Object Lifetime
    1. 8.1. Classes, Objects, and References
    2. 8.2. The Basics of Object Lifetime
      1. 8.2.1. The CIL of new
      2. 8.2.2. Setting Object References to Nothing
    3. 8.3. The Role of Application Roots
    4. 8.4. Understanding Object Generations
    5. 8.5. Concurrent Garbage Collection under .NET 1.0 - 3.5
      1. 8.5.1. Background Garbage Collection under .NET 4.0
    6. 8.6. The System.GC Type
      1. 8.6.1. Forcing a Garbage Collection
    7. 8.7. Building Finalizable Objects
      1. 8.7.1. Overriding System.Object.Finalize()
      2. 8.7.2. Detailing the Finalization Process
    8. 8.8. Building Disposable Objects
      1. 8.8.1. Using Keyword with VB 2010
    9. 8.9. Building Finalizable and Disposable Types
      1. 8.9.1. A Formalized Disposal Pattern
    10. 8.10. Understanding Lazy Object Instantiation
      1. 8.10.1. Customizing the Creation of the Lazy Data
    11. 8.11. Summary
  14. 9. Working with Interfaces
    1. 9.1. Understanding Interface Types
      1. 9.1.1. Interface Types vs. Abstract Base Classes
    2. 9.2. Defining Custom Interfaces
    3. 9.3. Implementing an Interface
    4. 9.4. Invoking Interface Members at the Object Level
      1. 9.4.1. Obtaining Interface References: The TryCast Keyword
      2. 9.4.2. Obtaining Interface References: The Is Keyword
    5. 9.5. Interfaces As Parameters
    6. 9.6. Interfaces As Return Values
    7. 9.7. Arrays of Interface Types
    8. 9.8. Implementing Interfaces Using Visual Studio 2010
    9. 9.9. Resolving Name Clashes via Explicit Interface Implementation
    10. 9.10. Designing Interface Hierarchies
      1. 9.10.1. Multiple Inheritance with Interface Types
    11. 9.11. Building Enumerable Types (IEnumerable and IEnumerator)
    12. 9.12. Building Cloneable Objects (ICloneable)
      1. 9.12.1. A More Elaborate Cloning Example
    13. 9.13. Building Comparable Objects (IComparable)
      1. 9.13.1. Specifying Multiple Sort Orders (IComparer)
      2. 9.13.2. Custom Properties, Custom Sort Types
    14. 9.14. Summary
  15. 10. Understanding Generics
    1. 10.1. The Issues with Non-Generic Collections
      1. 10.1.1. The Issue of Performance
      2. 10.1.2. The Issue of Type Safety
    2. 10.2. The Role of Generic Type Parameters
      1. 10.2.1. Specifying Type Parameters for Generic Classes / Structures
      2. 10.2.2. Specifying Type Parameters for Generic Members
      3. 10.2.3. Specifying Type Parameters for Generic Interfaces
    3. 10.3. The System.Collections.Generic Namespace
      1. 10.3.1. Understanding Collection Initialization Syntax
      2. 10.3.2. Working with the List(Of T) Class
      3. 10.3.3. Working with the Stack(Of T) Class
      4. 10.3.4. Working with the Queue(Of T) Class
      5. 10.3.5. Working with the SortedSet(Of T) Class
    4. 10.4. Creating Custom Generic Methods
      1. 10.4.1. Inference of Type Parameters
    5. 10.5. Creating Custom Generic Structures and Classes
      1. 10.5.1. The Nothing Keyword in Generic Code
      2. 10.5.2. Generic Base Classes
    6. 10.6. Constraining Type Parameters
      1. 10.6.1. Examples Using the As Keyword
      2. 10.6.2. The Lack of Operator Constraints
    7. 10.7. Summary
  16. 11. Delegates, Events, and Lambdas
    1. 11.1. Understanding the .NET Delegate Type
    2. 11.2. Defining a Delegate Type in VB 2010
    3. 11.3. The System.MulticastDelegate and System.Delegate Base Classes
    4. 11.4. The Simplest Possible Delegate Example
      1. 11.4.1. Investigating a Delegate Object
    5. 11.5. Sending Object State Notifications Using Delegates
      1. 11.5.1. Enabling Multicasting
      2. 11.5.2. Removing Targets from a Delegate's Invocation List
    6. 11.6. Method Group Conversion Syntax
    7. 11.7. Understanding Delegate Covariance
    8. 11.8. Understanding Generic Delegates
      1. 11.8.1. Simulating Generic Delegates Without Generics
    9. 11.9. Understanding VB 2010 Events
      1. 11.9.1. The VB 2010 Event Keyword
      2. 11.9.2. Events under the Hood
      3. 11.9.3. Listening to Incoming Events
      4. 11.9.4. Simplifying Event Registration Using Visual Studio 2010
      5. 11.9.5. Creating Custom Event Arguments
      6. 11.9.6. The Generic EventHandler(Of T) Delegate
    10. 11.10. Understanding VB 2010 Anonymous Methods
      1. 11.10.1. Accessing Local Variables
    11. 11.11. Understanding Lambda Expressions
      1. 11.11.1. Dissecting a Lambda Expression
      2. 11.11.2. Processing Arguments Within Multiple Statements
      3. 11.11.3. Lambda Expressions with Multiple (or Zero) Parameters
      4. 11.11.4. Retrofitting the CarEvents Example Using Lambda Expressions
    12. 11.12. Summary
  17. 12. Advanced VB 2010 Language Features
    1. 12.1. Understanding Indexer Methods
      1. 12.1.1. Indexing Data Using String Values
      2. 12.1.2. Overloading Indexer Methods
      3. 12.1.3. Indexers with Multiple Dimensions
      4. 12.1.4. Indexer Definitions on Interface Types
    2. 12.2. Understanding Operator Overloading
      1. 12.2.1. Overloading Binary Operators
      2. 12.2.2. And What of the += and –= Operators?
      3. 12.2.3. Overloading Unary Operators
      4. 12.2.4. Overloading Equality Operators
      5. 12.2.5. Overloading Comparison Operators
      6. 12.2.6. The Internal Representation of Overloaded Operators
      7. 12.2.7. Final Thoughts Regarding Operator Overloading
    3. 12.3. Understanding Custom Type Conversions
      1. 12.3.1. Recall: Numerical Conversions
      2. 12.3.2. Recall: Conversions Among Related Class Types
      3. 12.3.3. Creating Custom Conversion Routines
      4. 12.3.4. Additional Explicit Conversions for the Square Type
      5. 12.3.5. Defining Implicit Conversion Routines
      6. 12.3.6. The Internal Representation of Custom Conversion Routines
      7. 12.3.7. Understanding Extension Methods
        1. 12.3.7.1. Defining Extension Methods
        2. 12.3.7.2. Invoking Extension Methods on an Instance Level
        3. 12.3.7.3. Invoking Extension Methods as Shared Methods
        4. 12.3.7.4. The Scope of an Extension Method
        5. 12.3.7.5. Importing Types That Define Extension Methods
        6. 12.3.7.6. The IntelliSense of Extension Methods
        7. 12.3.7.7. Building and Using Extension Libraries
        8. 12.3.7.8. Extending Interface Types via Extension Methods
      8. 12.3.8. Understanding Partial Methods
        1. 12.3.8.1. A First Look at Partial Methods
        2. 12.3.8.2. Uses of Partial Methods
      9. 12.3.9. Understanding Anonymous Types
        1. 12.3.9.1. The Internal Representation of Anonymous Types
        2. 12.3.9.2. The Implementation of ToString() and GetHashCode()
        3. 12.3.9.3. The Semantics of Equality for Anonymous Types
        4. 12.3.9.4. Anonymous Types Containing Anonymous Types
    4. 12.4. Summary
  18. 13. LINQ to Objects
    1. 13.1. LINQ Specific Programming Constructs
      1. 13.1.1. Implicit Typing of Local Variables
      2. 13.1.2. Object and Collection Initialization Syntax
      3. 13.1.3. Lambda Expressions
      4. 13.1.4. Extension Methods
      5. 13.1.5. Anonymous Types
    2. 13.2. Understanding the Role of LINQ
      1. 13.2.1. LINQ Expressions Are Strongly Typed
      2. 13.2.2. The Core LINQ Assemblies
    3. 13.3. Applying LINQ Queries to Primitive Arrays
      1. 13.3.1. Once Again, Without LINQ
      2. 13.3.2. Reflecting Over a LINQ Result Set
      3. 13.3.3. LINQ and Implicitly Typed Local Variables
      4. 13.3.4. LINQ and Extension Methods
      5. 13.3.5. The Role of Deferred Execution
      6. 13.3.6. The Role of Immediate Execution
    4. 13.4. Returning the Result of a LINQ Query
      1. 13.4.1. Returning LINQ Results via Immediate Execution
    5. 13.5. Applying LINQ Queries to Collection Objects
      1. 13.5.1. Accessing Contained Subobjects
      2. 13.5.2. Applying LINQ Queries to Nongeneric Collections
      3. 13.5.3. Filtering Data Using OfType(Of T)()
    6. 13.6. Investigating the VB 2010 LINQ Query Operators
      1. 13.6.1. Basic Selection Syntax
      2. 13.6.2. Obtaining Subsets of Data
      3. 13.6.3. Projecting New Data Types
      4. 13.6.4. Obtaining Counts Using Enumerable
      5. 13.6.5. Reversing Result Sets
      6. 13.6.6. Sorting Expressions
      7. 13.6.7. LINQ As a Better Venn Diagramming Tool
      8. 13.6.8. Removing Duplicates
      9. 13.6.9. LINQ Aggregation Operations
    7. 13.7. The Internal Representation of LINQ Query Statements
      1. 13.7.1. Building Query Expressions with Query Operators (Revisited)
      2. 13.7.2. Building Query Expressions Using the Enumerable Type and Lambda Expressions
      3. 13.7.3. Building Query Expressions Using the Enumerable Type and Anonymous Methods
      4. 13.7.4. Building Query Expressions Using the Enumerable Type and Raw Delegates
    8. 13.8. Summary
  19. 14. Configuring .NET Assemblies
    1. 14.1.
      1. 14.1.1. Observing the Root Namespace
      2. 14.1.2. Defining Namespaces Beyond the Root
      3. 14.1.3. Defining Custom Namespaces
      4. 14.1.4. Resolving Name Clashes with Fully Qualified Names
      5. 14.1.5. Resolving Name Clashes with Aliases
      6. 14.1.6. Creating Nested Namespaces
    2. 14.2. The Role of .NET Assemblies
      1. 14.2.1. Assemblies Promote Code Reuse
      2. 14.2.2. Assemblies Establish a Type Boundary
      3. 14.2.3. Assemblies Are Versionable Units
      4. 14.2.4. Assemblies Are Self-Describing
      5. 14.2.5. Assemblies Are Configurable
    3. 14.3. Understanding the Format of a .NET Assembly
      1. 14.3.1. The Windows File Header
      2. 14.3.2. The CLR File Header
      3. 14.3.3. CIL Code, Type Metadata, and the Assembly Manifest
      4. 14.3.4. Optional Assembly Resources
      5. 14.3.5. Single-File and Multifile Assemblies
    4. 14.4. Building and Consuming a Single-File Assembly
      1. 14.4.1. Exploring the Manifest
      2. 14.4.2. Exploring the CIL
      3. 14.4.3. Exploring the Type Metadata
      4. 14.4.4. Building a VB 2010 Client Application
      5. 14.4.5. Building a C# Client Application
      6. 14.4.6. Cross-Language Inheritance in Action
    5. 14.5. Building and Consuming a Multifile Assembly
      1. 14.5.1. Exploring the ufo.netmodule File
      2. 14.5.2. Exploring the airvehicles.dll File
      3. 14.5.3. Consuming a Multifile Assembly
    6. 14.6. Understanding Private Assemblies
      1. 14.6.1. The Identity of a Private Assembly
      2. 14.6.2. Understanding the Probing Process
      3. 14.6.3. Configuring Private Assemblies
      4. 14.6.4. Configuration Files and Visual Studio 2010
    7. 14.7. Understanding Shared Assemblies
      1. 14.7.1. Understanding Strong Names
      2. 14.7.2. Generating Strong Names at the Command Line
      3. 14.7.3. Generating Strong Names using Visual Studio 2010
      4. 14.7.4. Installing Strongly Named Assemblies to the GAC
    8. 14.8. Consuming a Shared Assembly
      1. 14.8.1. Exploring the Manifest of SharedCarLibClient
    9. 14.9. Configuring Shared Assemblies
      1. 14.9.1. Freezing the Current Shared Assembly
      2. 14.9.2. Building Shared Assembly Version 2.0.0.0
      3. 14.9.3. Dynamically Redirecting to Specific Versions of a Shared Assembly
    10. 14.10. Understanding Publisher Policy Assemblies
      1. 14.10.1. Disabling Publisher Policy
    11. 14.11. Understanding the <codeBase> Element
    12. 14.12. The System.Configuration Namespace
    13. 14.13. Summary
  20. 15. Type Reflection, Late Binding, and Attribute-Based Programming
    1. 15.1. The Necessity of Type Metadata
      1. 15.1.1. Viewing (Partial) Metadata for the EngineState Enumeration
      2. 15.1.2. Viewing (Partial) Metadata for the Car Type
      3. 15.1.3. Examining a TypeRef
      4. 15.1.4. Documenting the Defining Assembly
      5. 15.1.5. Documenting Referenced Assemblies
      6. 15.1.6. Documenting String Literals
    2. 15.2. Understanding Reflection
      1. 15.2.1. The System.Type Class
      2. 15.2.2. Obtaining a Type Reference Using System.Object.GetType()
      3. 15.2.3. Obtaining a Type Reference Using System.Type.GetType()
      4. 15.2.4. Obtaining a Type Reference Using GetType()
    3. 15.3. Building a Custom Metadata Viewer
      1. 15.3.1. Reflecting on Methods
      2. 15.3.2. Reflecting on Fields and Properties
      3. 15.3.3. Reflecting on Implemented Interfaces
      4. 15.3.4. Displaying Various Odds and Ends
      5. 15.3.5. Implementing Main()
      6. 15.3.6. Reflecting on Generic Types
      7. 15.3.7. Reflecting on Method Parameters and Return Values
    4. 15.4. Dynamically Loading Assemblies
    5. 15.5. Reflecting on Shared Assemblies
    6. 15.6. Understanding Late Binding
      1. 15.6.1. The System.Activator Class
      2. 15.6.2. Invoking Methods with No Parameters
      3. 15.6.3. Invoking Methods with Parameters
    7. 15.7. Understanding the Role of .NET Attributes
      1. 15.7.1. Attribute Consumers
      2. 15.7.2. Applying Attributes in VB 2010
      3. 15.7.3. VB 2010 Attribute Shorthand Notation
      4. 15.7.4. Specifying Constructor Parameters for Attributes
      5. 15.7.5. The Obsolete Attribute in Action
    8. 15.8. Building Custom Attributes
      1. 15.8.1. Applying Custom Attributes
      2. 15.8.2. Named Property Syntax
      3. 15.8.3. Restricting Attribute Usage
    9. 15.9. Assembly-Level (and Module-Level) Attributes
      1. 15.9.1. The Visual Studio 2010 AssemblyInfo.vb File
    10. 15.10. Reflecting on Attributes Using Early Binding
    11. 15.11. Reflecting on Attributes Using Late Binding
    12. 15.12. Putting Reflection, Late Binding, and Custom Attributes in Perspective
    13. 15.13. Building an Extendable Application
      1. 15.13.1. Building CommonSnappableTypes.dll
      2. 15.13.2. Building the VB 2010 Snap-In
      3. 15.13.3. Building the C# Snap-In
      4. 15.13.4. Building an Extendable Windows Forms Application
    14. 15.14. Summary
  21. 16. Processes, AppDomains, and Object Contexts
    1. 16.1. The Role of a Windows Process
      1. 16.1.1. The Role of Threads
    2. 16.2. Interacting with Processes Under the .NET Platform
      1. 16.2.1. Enumerating Running Processes
      2. 16.2.2. Investigating a Specific Process
      3. 16.2.3. Investigating a Process's Thread Set
      4. 16.2.4. Investigating a Process's Module Set
      5. 16.2.5. Starting and Stopping Processes Programmatically
      6. 16.2.6. Controlling Process Startup Using the ProcessStartInfo Class
    3. 16.3. Understanding .NET Application Domains
      1. 16.3.1. The System.AppDomain Class
    4. 16.4. Interacting with the Default Application Domain
      1. 16.4.1. Enumerating Loaded Assemblies
      2. 16.4.2. Receiving Assembly Load Notifications
    5. 16.5. Creating New Application Domains
      1. 16.5.1. Loading Assemblies into Custom Application Domains
      2. 16.5.2. Programmatically Unloading AppDomains
    6. 16.6. Understanding Object Context Boundaries
      1. 16.6.1. Context-Agile and Context-Bound Types
      2. 16.6.2. Defining a Context-Bound Object
      3. 16.6.3. Inspecting an Object's Context
    7. 16.7. Summarizing Processes, AppDomains, and Context
    8. 16.8. Summary
  22. 17. Understanding CIL and the Role of Dynamic Assemblies
    1. 17.1. Reasons for Learning the Grammar of CIL
    2. 17.2. Examining CIL Directives, Attributes, and Opcodes
      1. 17.2.1. The Role of CIL Directives
      2. 17.2.2. The Role of CIL Attributes
      3. 17.2.3. The Role of CIL Opcodes
      4. 17.2.4. The CIL Opcode/CIL Mnemonic Distinction
    3. 17.3. Pushing and Popping: The Stack-Based Nature of CIL
    4. 17.4. Understanding Round-Trip Engineering
      1. 17.4.1. The Role of CIL Code Labels
      2. 17.4.2. Interacting with CIL: Modifying an *.il File
      3. 17.4.3. Compiling CIL Code Using ilasm.exe
      4. 17.4.4. Authoring CIL Code Using SharpDevelop
      5. 17.4.5. The Role of peverify.exe
    5. 17.5. Understanding CIL Directives and Attributes
      1. 17.5.1. Specifying Externally Referenced Assemblies in CIL
      2. 17.5.2. Defining the Current Assembly in CIL
      3. 17.5.3. Defining Namespaces in CIL
      4. 17.5.4. Defining Class Types in CIL
      5. 17.5.5. Defining and Implementing Interfaces in CIL
      6. 17.5.6. Defining Structures in CIL
      7. 17.5.7. Defining Enums in CIL
      8. 17.5.8. Defining Generics in CIL
      9. 17.5.9. Compiling the CILTypes.il file
    6. 17.6. .NET Base Class Library, VB 2010, and CIL Data Type Mappings
    7. 17.7. Defining Type Members in CIL
      1. 17.7.1. Defining Field Data in CIL
      2. 17.7.2. Defining Type Constructors in CIL
      3. 17.7.3. Defining Properties in CIL
      4. 17.7.4. Defining Member Parameters
    8. 17.8. Examining CIL Opcodes
      1. 17.8.1. The .maxstack Directive
      2. 17.8.2. Declaring Local Variables in CIL
      3. 17.8.3. Mapping Parameters to Local Variables in CIL
      4. 17.8.4. The Hidden Me Reference
      5. 17.8.5. Representing Iteration Constructs in CIL
    9. 17.9. Building a .NET Assembly with CIL
      1. 17.9.1. Building CILCars.dll
      2. 17.9.2. Building CILCarClient.exe
    10. 17.10. Understanding Dynamic Assemblies
      1. 17.10.1. Exploring the System.Reflection.Emit Namespace
      2. 17.10.2. The Role of the System.Reflection.Emit.ILGenerator
      3. 17.10.3. Emitting a Dynamic Assembly
      4. 17.10.4. Emitting the Assembly and Module Set
      5. 17.10.5. The Role of the ModuleBuilder Type
      6. 17.10.6. Emitting the HelloClass Type and the String Member Variable
      7. 17.10.7. Emitting the Constructors
      8. 17.10.8. Emitting the SayHello() Method
      9. 17.10.9. Using the Dynamically Generated Assembly
    11. 17.11. Summary
  23. 18. Dynamic Types and the Dynamic Language Runtime
    1. 18.1. Basics of Dynamic Typing in VB 2010
    2. 18.2. The Role of Dynamic Typing in VB 2010
      1. 18.2.1. Calling Members on Dynamically Declared Data
      2. 18.2.2. The Role of the Microsoft.VisualBasic.dll Assembly
      3. 18.2.3. The Scope of the Dynamic Objects
      4. 18.2.4. Limitations of the Dynamic Type
      5. 18.2.5. Practical Uses of the Dynamic Types
    3. 18.3. The Role of the Dynamic Language Runtime (DLR)
      1. 18.3.1. The Role of Expression Trees
      2. 18.3.2. The Role of the System.Dynamic Namespace
      3. 18.3.3. Dynamic Runtime Lookup of Expression Trees
    4. 18.4. Simplifying Late Bound Calls Using Dynamic Typing
      1. 18.4.1. Leveraging the Dynamic Typing to Pass Arguments
    5. 18.5. Simplifying COM Interoperability using Dynamic Data
      1. 18.5.1. The Role of Primary Interop Assemblies (PIAs)
      2. 18.5.2. Embedding Interop Metadata
      3. 18.5.3. Common COM Interop Pain Points
    6. 18.6. COM Interop using VB 2010 Language Features
      1. 18.6.1. COM Interop without VB 2010 Language Features
    7. 18.7. Summary
  24. 19. Multithreaded and Parallel Programming
    1. 19.1. The Process/AppDomain/Context/Thread Relationship
      1. 19.1.1. The Problem of Concurrency
      2. 19.1.2. The Role of Thread Synchronization
    2. 19.2. A Brief Review of the .NET Delegate
    3. 19.3. The Asynchronous Nature of Delegates
      1. 19.3.1. The BeginInvoke() and EndInvoke() Methods
      2. 19.3.2. The System.IAsyncResult Interface
    4. 19.4. Invoking a Method Asynchronously
      1. 19.4.1. Synchronizing the Calling Thread
      2. 19.4.2. The Role of the AsyncCallback Delegate
      3. 19.4.3. The Role of the AsyncResult Class
      4. 19.4.4. Passing and Receiving Custom State Data
    5. 19.5. The System.Threading Namespace
    6. 19.6. The System.Threading.Thread Class
      1. 19.6.1. Obtaining Statistics About the Current Thread
      2. 19.6.2. The Name Property
      3. 19.6.3. The Priority Property
    7. 19.7. Programmatically Creating Secondary Threads
      1. 19.7.1. Working with the ThreadStart Delegate
      2. 19.7.2. Working with the ParameterizedThreadStart Delegate
      3. 19.7.3. The AutoResetEvent Class
      4. 19.7.4. Foreground Threads and Background Threads
    8. 19.8. The Issue of Concurrency
      1. 19.8.1. Synchronization Using the VB 2010 SyncLock Keyword
      2. 19.8.2. Synchronization Using the System.Threading.Monitor Type
      3. 19.8.3. Synchronization Using the System.Threading.Interlocked Type
      4. 19.8.4. Synchronization Using the <Synchronization()> Attribute
    9. 19.9. Programming with Timer Callbacks
    10. 19.10. Understanding the CLR ThreadPool
    11. 19.11. Parallel Programming under the .NET Platform
      1. 19.11.1. The Task Parallel Library API
      2. 19.11.2. The Role of the Parallel Class
      3. 19.11.3. Understanding Data Parallelism
      4. 19.11.4. The Task Class
      5. 19.11.5. Handling Cancelation Request
      6. 19.11.6. Understanding Task Parallelism
    12. 19.12. Parallel LINQ Queries (PLINQ)
      1. 19.12.1. Opting in to a PLINQ Query
      2. 19.12.2. Canceling a PLINQ Query
    13. 19.13. Summary
  25. 20. File I/O and Object Serialization
    1. 20.1. Exploring the System.IO Namespace
    2. 20.2. The Directory(Info) and File(Info) Types
      1. 20.2.1. The MustInherit FileSystemInfo Base Class
    3. 20.3. Working with the DirectoryInfo Type
      1. 20.3.1. Enumerating Files with the DirectoryInfo Type
      2. 20.3.2. Creating Subdirectories with the DirectoryInfo Type
    4. 20.4. Working with the Directory Type
    5. 20.5. Working with the DriveInfo Class Type
    6. 20.6. Working with the FileInfo Class
      1. 20.6.1. The FileInfo.Create() Method
      2. 20.6.2. The FileInfo.Open() Method
      3. 20.6.3. The FileInfo.OpenRead() and FileInfo.OpenWrite() Methods
      4. 20.6.4. The FileInfo.OpenText() Method
      5. 20.6.5. The FileInfo.CreateText() and FileInfo.AppendText() Methods
    7. 20.7. Working with the File Type
      1. 20.7.1. Additional File-centric Members
    8. 20.8. The MustInherit Stream Class
      1. 20.8.1. Working with FileStreams
    9. 20.9. Working with StreamWriters and StreamReaders
      1. 20.9.1. Writing to a Text File
      2. 20.9.2. Reading from a Text File
      3. 20.9.3. Directly Creating StreamWriter/StreamReader Types
    10. 20.10. Working with StringWriters and StringReaders
    11. 20.11. Working with BinaryWriters and BinaryReaders
    12. 20.12. Watching Files Programmatically
    13. 20.13. Understanding Object Serialization
      1. 20.13.1. The Role of Object Graphs
    14. 20.14. Configuring Objects for Serialization
      1. 20.14.1. Defining Serializable Types
      2. 20.14.2. Public Fields, Private Fields, and Public Properties
    15. 20.15. Choosing a Serialization Formatter
      1. 20.15.1. The IFormatter and IRemotingFormatter Interfaces
      2. 20.15.2. Type Fidelity Among the Formatters
    16. 20.16. Serializing Objects Using the BinaryFormatter
      1. 20.16.1. Deserializing Objects Using the BinaryFormatter
    17. 20.17. Serializing Objects Using the SoapFormatter
    18. 20.18. Serializing Objects Using the XmlSerializer
      1. 20.18.1. Controlling the Generated XML Data
    19. 20.19. Serializing Collections of Objects
    20. 20.20. Customizing the Soap/Binary Serialization Process
      1. 20.20.1. A Deeper Look at Object Serialization
      2. 20.20.2. Customizing Serialization Using ISerializable
      3. 20.20.3. Customizing Serialization Using Attributes
    21. 20.21. Summary
  26. 21. ADO.NET Part I: The Connected Layer
    1. 21.1. A High-Level Definition of ADO.NET
    2. 21.2. The Three Faces of ADO.NET
    3. 21.3. Understanding ADO.NET Data Providers
      1. 21.3.1. The Microsoft-Supplied ADO.NET Data Providers
      2. 21.3.2. A Word Regarding System.Data.OracleClient.dll
      3. 21.3.3. Obtaining Third-Party ADO.NET Data Providers
    4. 21.4. Additional ADO.NET Namespaces
    5. 21.5. The Types of the System.Data Namespace
      1. 21.5.1. The Role of the IDbConnection Interface
      2. 21.5.2. The Role of the IDbTransaction Interface
      3. 21.5.3. The Role of the IDbCommand Interface
      4. 21.5.4. The Role of the IDbDataParameter and IDataParameter Interfaces
      5. 21.5.5. The Role of the IDbDataAdapter and IDataAdapter Interfaces
      6. 21.5.6. The Role of the IDataReader and IDataRecord Interfaces
    6. 21.6. Abstracting Data Providers Using Interfaces
      1. 21.6.1. Increasing Flexibility Using Application Configuration Files
    7. 21.7. Creating the AutoLot Database
      1. 21.7.1. Creating the Inventory Table
      2. 21.7.2. Authoring the GetPetName() Stored Procedure
      3. 21.7.3. Creating the Customers and Orders Tables
      4. 21.7.4. Visually Creating Table Relationships
    8. 21.8. The ADO.NET Data Provider Factory Model
      1. 21.8.1. A Complete Data Provider Factory Example
      2. 21.8.2. A Potential Drawback with the Provide Factory Model
      3. 21.8.3. The <connectionStrings> Element
    9. 21.9. Understanding the Connected Layer of ADO.NET
      1. 21.9.1. Working with Connection Objects
      2. 21.9.2. Working with ConnectionStringBuilder Objects
      3. 21.9.3. Working with Command Objects
    10. 21.10. Working with Data Readers
      1. 21.10.1. Obtaining Multiple Result Sets Using a Data Reader
    11. 21.11. Building a Reusable Data Access Library
      1. 21.11.1. Adding the Connection Logic
      2. 21.11.2. Adding the Insertion Logic
      3. 21.11.3. Adding the Deletion Logic
      4. 21.11.4. Adding the Update Logic
      5. 21.11.5. Adding the Selection Logic
      6. 21.11.6. Working with Parameterized Command Objects
        1. 21.11.6.1. Specifying Parameters Using the DbParameter Type
      7. 21.11.7. Executing a Stored Procedure
    12. 21.12. Creating a Console UI–Based Front End
      1. 21.12.1. Implementing the Main() Method
      2. 21.12.2. Implementing the ShowInstructions() Method
      3. 21.12.3. Implementing the ListInventory() Method
      4. 21.12.4. Implementing the DeleteCar() Method
      5. 21.12.5. Implementing the InsertNewCar() Method
      6. 21.12.6. Implementing the UpdateCarPetName() Method
      7. 21.12.7. Implementing LookUpPetName()
    13. 21.13. Understanding Database Transactions
      1. 21.13.1. Key Members of an ADO.NET Transaction Object
      2. 21.13.2. Adding a CreditRisks Table to the AutoLot Database
      3. 21.13.3. Adding a Transaction Method to InventoryDAL
      4. 21.13.4. Testing Your Database Transaction
    14. 21.14. Summary
  27. 22. ADO.NET Part II: The Disconnected Layer
    1. 22.1. Understanding the Disconnected Layer of ADO.NET
    2. 22.2. Understanding the Role of the DataSet
      1. 22.2.1. Key Properties of the DataSet
      2. 22.2.2. Key Methods of the DataSet
      3. 22.2.3. Building a DataSet
    3. 22.3. Working with DataColumns
      1. 22.3.1. Building a DataColumn
      2. 22.3.2. Enabling Autoincrementing Fields
      3. 22.3.3. Adding DataColumn Objects to a DataTable
    4. 22.4. Working with DataRows
      1. 22.4.1. Understanding the RowState Property
      2. 22.4.2. Understanding the DataRowVersion Property
    5. 22.5. Working with DataTables
      1. 22.5.1. Inserting DataTables into DataSets
      2. 22.5.2. Obtaining Data in a DataSet
      3. 22.5.3. Processing DataTable Data Using DataTableReader Objects
      4. 22.5.4. Serializing DataTable/DataSet Objects As XML
      5. 22.5.5. Serializing DataTable/DataSet Objects in a Binary Format
    6. 22.6. Binding DataTable Objects to Windows Forms GUIs
      1. 22.6.1. Hydrating a DataTable from a Generic List(Of T)
      2. 22.6.2. Deleting Rows from a DataTable
      3. 22.6.3. Selecting Rows Based on Filter Criteria
      4. 22.6.4. Updating Rows Within a DataTable
      5. 22.6.5. Working with the DataView Type
    7. 22.7. Working with Data Adapters
      1. 22.7.1. A Simple Data Adapter Example
      2. 22.7.2. Mapping Database Names to Friendly Names
    8. 22.8. Adding Disconnection Functionality to AutoLotDAL.dll
      1. 22.8.1. Defining the Initial Class Type
      2. 22.8.2. Configuring the Data Adapter Using the SqlCommandBuilder
      3. 22.8.3. Implementing GetAllInventory()
      4. 22.8.4. Implementing UpdateInventory()
      5. 22.8.5. Setting Your Version Number
      6. 22.8.6. Testing the Disconnected Functionality
    9. 22.9. Multitabled DataSet Objects and Data Relationships
      1. 22.9.1. Prepping the Data Adapters
      2. 22.9.2. Building the Table Relationships
      3. 22.9.3. Updating the Database Tables
      4. 22.9.4. Navigating Between Related Tables
    10. 22.10. The Windows Forms Database Designer Tools
      1. 22.10.1. Visually Designing the DataGridView
      2. 22.10.2. The Generated app.config File
      3. 22.10.3. Examining the Strongly Typed DataSet
      4. 22.10.4. Examining the Strongly Typed DataTable
      5. 22.10.5. Examining the Strongly Typed DataRow
      6. 22.10.6. Examining the Strongly Typed Data Adapter
      7. 22.10.7. Completing the Windows Forms Application
    11. 22.11. Isolating Strongly Typed Database Code into a Class Library
      1. 22.11.1. Viewing the Generated Code
      2. 22.11.2. Selecting Data with the Generated Code
      3. 22.11.3. Inserting Data with the Generated Code
      4. 22.11.4. Deleting Data with the Generated Code
      5. 22.11.5. Invoking a Stored Procedure using the Generated Code
    12. 22.12. Programming with LINQ to DataSet
      1. 22.12.1. The Role of the DataSet Extensions Library
      2. 22.12.2. Obtaining a LINQ-Compatible DataTable
      3. 22.12.3. The Role of the DataRowExtensions.Field(Of T)() Extension Method
      4. 22.12.4. Hydrating New DataTables from LINQ Queries
    13. 22.13. Summary
  28. 23. ADO.NET Part III: The Entity Framework
    1. 23.1. Understanding the Role of Entity Framework
      1. 23.1.1. The Role of Entities
      2. 23.1.2. The Building Blocks of the Entity Framework
        1. 23.1.2.1. The Role of Object Services
        2. 23.1.2.2. The Role of the Entity Client
        3. 23.1.2.3. The Role of the *.edmx File (and Friends)
        4. 23.1.2.4. The Role of the ObjectContext and ObjectSet(Of T) Classes
        5. 23.1.2.5. All Together Now!
    2. 23.2. Building and Analyzing your First EDM
      1. 23.2.1.
        1. 23.2.1.1. Generating the *.edmx File
        2. 23.2.1.2. Reshaping the Entity Data
        3. 23.2.1.3. Viewing the Mappings
        4. 23.2.1.4. Viewing the Generated *.edmx File Data
        5. 23.2.1.5. Viewing the Generated Source Code
        6. 23.2.1.6. Enhancing the Generated Source Code
    3. 23.3. Programming Against the Conceptual Model
      1. 23.3.1.
        1. 23.3.1.1. Deleting a Record
        2. 23.3.1.2. Updating a Record
        3. 23.3.1.3. Querying with LINQ to Entities
        4. 23.3.1.4. Querying with Entity SQL
        5. 23.3.1.5. Working with the Entity Client Data Reader Object
    4. 23.4. AutoLotDAL Version 4.0, Now with Entities
      1. 23.4.1. Mapping the Stored Procedure
      2. 23.4.2. The Role of Navigation Properties
      3. 23.4.3. Using Navigation Properties within LINQ to Entity Queries
      4. 23.4.4. Invoking a Stored Procedure
    5. 23.5. Data Binding Entities to Windows Forms GUIs
      1. 23.5.1. Adding the Data Binding Code
    6. 23.6. Summary
  29. 24. Introducing LINQ to XML
    1. 24.1. A Tale of Two XML APIs
      1. 24.1.1. LINQ to XML As a Better DOM
      2. 24.1.2. VB 2010 Literal Syntax As a Better LINQ to XML
    2. 24.2. Members of the System.Xml.Linq Namespace
      1. 24.2.1. The LINQ to XML Axis Methods
      2. 24.2.2. The Oddness of XName (and XNamespace)
    3. 24.3. Working with XElement and XDocument
      1. 24.3.1. Generating Documents from Arrays and Containers
      2. 24.3.2. Loading and Parsing XML Content
    4. 24.4. Manipulating an in Memory XML Document
      1. 24.4.1. Building the UI of the LINQ to XML App
      2. 24.4.2. Import the Inventory.xml File
      3. 24.4.3. Defining a LINQ to XML Helper Class
      4. 24.4.4. Rigging up the UI to Your Helper Class
    5. 24.5. Summary
  30. 25. Introducing Windows Communication Foundation
    1. 25.1. A Potpourri of Distributed Computing APIs
      1. 25.1.1. The Role of DCOM
      2. 25.1.2. The Role of COM+/Enterprise Services
      3. 25.1.3. The Role of MSMQ
      4. 25.1.4. The Role of .NET Remoting
      5. 25.1.5. The Role of XML Web Services
        1. 25.1.5.1. A .NET Web Service Example
        2. 25.1.5.2. Web Service Standards
      6. 25.1.6. Named Pipes, Sockets, and P2P
    2. 25.2. The Role of WCF
      1. 25.2.1. An Overview of WCF Features
      2. 25.2.2. An Overview of Service-Oriented Architecture
        1. 25.2.2.1. Tenet 1: Boundaries Are Explicit
        2. 25.2.2.2. Tenet 2: Services Are Autonomous
        3. 25.2.2.3. Tenet 3: Services Communicate via Contract, Not Implementation
        4. 25.2.2.4. Tenet 4: Service Compatibility Is Based on Policy
      3. 25.2.3. WCF: The Bottom Line
    3. 25.3. Investigating the Core WCF Assemblies
    4. 25.4. The Visual Studio WCF Project Templates
      1. 25.4.1. The WCF Service Website Project Template
    5. 25.5. The Basic Composition of a WCF Application
    6. 25.6. The ABCs of WCF
      1. 25.6.1. Understanding WCF Contracts
      2. 25.6.2. Understanding WCF Bindings
        1. 25.6.2.1. HTTP-Based Bindings
        2. 25.6.2.2. TCP-Based Bindings
        3. 25.6.2.3. MSMQ-Based Bindings
      3. 25.6.3. Understanding WCF Addresses
    7. 25.7. Building a WCF Service
      1. 25.7.1. The <ServiceContract()> Attribute
      2. 25.7.2. The <OperationContract()> Attribute
      3. 25.7.3. Service Types As Operational Contracts
    8. 25.8. Hosting the WCF Service
      1. 25.8.1. Establishing the ABCs Within an App.config File
      2. 25.8.2. Coding Against the ServiceHost Type
      3. 25.8.3. Specifying Base Addresses
      4. 25.8.4. Details of the ServiceHost Type
      5. 25.8.5. Details of the <system.serviceModel> Element
      6. 25.8.6. Enabling Metadata Exchange
    9. 25.9. Building the WCF Client Application
      1. 25.9.1. Generating Proxy Code Using svcutil.exe
      2. 25.9.2. Generating Proxy Code Using Visual Studio 2010
      3. 25.9.3. Configuring a TCP-Based Binding
    10. 25.10. Simplifying Configuration Settings with WCF 4.0
      1. 25.10.1. Default Endpoints in WCF 4.0
      2. 25.10.2. Exposing a Single WCF Service Using Multiple Bindings
      3. 25.10.3. Changing Settings for a WCF Binding
      4. 25.10.4. The WCF 4.0 Default MEX Behavior Configuration
      5. 25.10.5. Refreshing the Client Proxy and Selecting the Binding
    11. 25.11. Using the WCF Service Library Project Template
      1. 25.11.1. Building a Simple Math Service
      2. 25.11.2. Testing the WCF Service with WcfTestClient.exe
      3. 25.11.3. Altering Configuration Files Using SvcConfigEditor.exe
    12. 25.12. Hosting the WCF Service within a Windows Service
      1. 25.12.1. Specifying the ABCs in Code
      2. 25.12.2. Enabling MEX
      3. 25.12.3. Creating a Windows Service Installer
      4. 25.12.4. Installing the Windows Service
    13. 25.13. Invoking a Service Asynchronously from the Client
    14. 25.14. Designing WCF Data Contracts
      1. 25.14.1. Using the Web-Centric WCF Service Project Template
      2. 25.14.2. Implementing the Service Contract
      3. 25.14.3. The Role of the *.svc File
      4. 25.14.4. Examining the Web.config File
      5. 25.14.5. Testing the Service
    15. 25.15. Summary
  31. 26. Introducing Windows Workflow Foundation 4.0
    1. 26.1. Defining a Business Process
      1. 26.1.1. The Role of WF 4.0
    2. 26.2. Building a (Painfully) Simple Workflow
      1. 26.2.1. Viewing the Underlying XAML
    3. 26.3. The WF 4.0 Runtime
      1. 26.3.1. Hosting a Workflow using WorkflowInvoker
        1. 26.3.1.1. Passing Arguments to your Workflow using WorkflowInvoker
        2. 26.3.1.2. Defining Arguments Using the Workflow Designer
      2. 26.3.2. Hosting a Workflow using WorkflowApplication
      3. 26.3.3. Recap of your First Workflow
    4. 26.4. Examining the Workflow 4.0 Activities
      1. 26.4.1. Control Flow Activities
      2. 26.4.2. Flowchart Activities
      3. 26.4.3. Messaging Activities
      4. 26.4.4. The Runtime and Primitives Activities
      5. 26.4.5. The Transaction Activities
      6. 26.4.6. The Collection and Error Handling Activities
    5. 26.5. Building a Flowchart Workflow
      1. 26.5.1. Connecting Activities in a Flowchart
      2. 26.5.2. Working with the InvokeMethod Activity
      3. 26.5.3. Defining Workflow Wide Variables
      4. 26.5.4. Working with the FlowDecision Activity
      5. 26.5.5. Working with the TerminateWorkflow Activity
      6. 26.5.6. Building the "True" Condition
      7. 26.5.7. Working with the ForEach<T> Activity
      8. 26.5.8. Completing the Application
      9. 26.5.9. Reflecting on What We Have Done
    6. 26.6. Isolating Workflows into Dedicated Libraries
      1. 26.6.1. Defining the Initial Project
      2. 26.6.2. Importing Assemblies and Namespaces
      3. 26.6.3. Defining the Workflow Arguments
      4. 26.6.4. Defining Workflow Variables
      5. 26.6.5. Working with the Assign Activity
      6. 26.6.6. Working with the If and Switch Activities
      7. 26.6.7. Building a Custom Code Activity
    7. 26.7. Consuming the Workflow Library
      1. 26.7.1. Retrieving the Workflow Output Argument
    8. 26.8. Summary
  32. 27. Introducing Windows Presentation Foundation and XAML
    1. 27.1. The Motivation Behind WPF
      1. 27.1.1. Unifying Diverse APIs
      2. 27.1.2. Providing a Separation of Concerns via XAML
      3. 27.1.3. Providing an Optimized Rendering Model
      4. 27.1.4. Simplifying Complex UI Programming
    2. 27.2. The Various Flavors of WPF
      1. 27.2.1. Traditional Desktop Applications
      2. 27.2.2. Navigation-Based WPF Applications
      3. 27.2.3. XBAP Applications
      4. 27.2.4. The WPF/Silverlight Relationship
    3. 27.3. Investigating the WPF Assemblies
      1. 27.3.1. The Role of the Application Class
        1. 27.3.1.1. Constructing an Application Class
        2. 27.3.1.2. Enumerating the Application.Windows collection
      2. 27.3.2. The Role of the Window Class
        1. 27.3.2.1. The Role of System.Windows.Controls.ContentControl
        2. 27.3.2.2. The Role of System.Windows.Controls.Control
        3. 27.3.2.3. The Role of System.Windows.FrameworkElement
        4. 27.3.2.4. The Role of System.Windows.UIElement
        5. 27.3.2.5. The Role of System.Windows.Media.Visual
        6. 27.3.2.6. The Role of System.Windows.DependencyObject
        7. 27.3.2.7. The Role of System.Windows.Threading.DispatcherObject
    4. 27.4. Building a WPF Application without XAML
      1. 27.4.1. Creating a Strongly Typed Window
      2. 27.4.2. Creating a Simple User Interface
      3. 27.4.3. Interacting with Application Level Data
      4. 27.4.4. Handling the Closing of a Window Object
      5. 27.4.5. Intercepting Mouse Events
      6. 27.4.6. Intercepting Keyboard Events
    5. 27.5. Building a WPF Application using Only XAML
      1. 27.5.1. Defining MainWindow in XAML
      2. 27.5.2. Defining the Application Object in XAML
      3. 27.5.3. Processing the XAML Files using msbuild.exe
    6. 27.6. Transforming Markup into a .NET Assembly
      1. 27.6.1. Mapping the Window XAML Data to VB 2010 Code
      2. 27.6.2. The Role of BAML
      3. 27.6.3. Mapping the Application XAML Data to VB 2010 Code
      4. 27.6.4. XAML-to-Assembly Process Summary
    7. 27.7. Understanding The Syntax of WPF XAML
      1. 27.7.1. Introducing Kaxaml
      2. 27.7.2. XAML XML Namespaces and XAML "Keywords"
      3. 27.7.3. Controlling Class and Member Variable Declarations
      4. 27.7.4. XAML Elements, XAML Attributes and Type Converters
      5. 27.7.5. Understanding XAML Property-Element Syntax
      6. 27.7.6. Understanding XAML Attached Properties
      7. 27.7.7. Understanding XAML Markup Extensions
    8. 27.8. Building a WPF Application using Code-Behind Files
      1. 27.8.1. Adding a Code File for the MainWindow Class
      2. 27.8.2. Adding a Code File for the MyApp Class
      3. 27.8.3. Processing the Code Files with msbuild.exe
    9. 27.9. Building WPF Applications Using Visual Studio 2010
      1. 27.9.1. The WPF Project Templates
      2. 27.9.2. Exploring the WPF Designer Tools
      3. 27.9.3. Designing the GUI of our Window
      4. 27.9.4. Implementing the Loaded Event
      5. 27.9.5. Implementing the Button's Click Event
      6. 27.9.6. Implementing the Closed Event
      7. 27.9.7. Testing the Application
    10. 27.10. Summary
  33. 28. Programming with WPF Controls
    1. 28.1. A Survey of the Core WPF Controls
      1. 28.1.1. Working with WPF Controls Using Visual Studio 2010
      2. 28.1.2. The WPF Ink Controls
      3. 28.1.3. The WPF Document Controls
      4. 28.1.4. WPF Common Dialog Boxes
      5. 28.1.5. The Details Are in the Documentation
    2. 28.2. Controlling Content Layout Using Panels
      1. 28.2.1. Positioning Content Within Canvas Panels
      2. 28.2.2. Positioning Content Within WrapPanel Panels
      3. 28.2.3. Positioning Content Within StackPanel Panels
      4. 28.2.4. Positioning Content Within Grid Panels
        1. 28.2.4.1. Grids with GridSplitter Types
      5. 28.2.5. Positioning Content Within DockPanel Panels
      6. 28.2.6. Enabling Scrolling for Panel Types
    3. 28.3. Building a Window's Frame Using Nested Panels
      1. 28.3.1. Building the Menu System
      2. 28.3.2. Building the ToolBar
      3. 28.3.3. Building the StatusBar
      4. 28.3.4. Finalizing the UI Design
      5. 28.3.5. Implementing the MouseEnter/MouseLeave Event Handlers
      6. 28.3.6. Implementing the Spell Checking Logic
    4. 28.4. Understanding WPF Control Commands
      1. 28.4.1. The Intrinsic Control Command Objects
      2. 28.4.2. Connecting Commands to the Command Property
      3. 28.4.3. Connecting Commands to Arbitrary Actions
      4. 28.4.4. Working with the Open and Save Commands
    5. 28.5. Building a WPF User Interface with Expression Blend
      1. 28.5.1. Getting to know the Key Aspects of the Blend IDE
      2. 28.5.2. Using the TabControl
    6. 28.6. Building the Ink API Tab
      1. 28.6.1. Designing the ToolBar
      2. 28.6.2. The RadioButton Control
      3. 28.6.3. The InkCanvas Control
      4. 28.6.4. The ComboBox Control
      5. 28.6.5. Saving, Loading, and Clearing InkCanvas Data
    7. 28.7. Introducing the Documents API
      1. 28.7.1. Block Elements and Inline Elements
      2. 28.7.2. Document Layout Managers
    8. 28.8. Building the Documents Tab
      1. 28.8.1. Populating a FlowDocument using Blend
      2. 28.8.2. Populating a FlowDocument Using Code
      3. 28.8.3. Enabling Annotations and Sticky Notes
      4. 28.8.4. Saving and Loading a Flow Document
    9. 28.9. Introducing the WPF Data-Binding Model
      1. 28.9.1. Building the Data Binding Tab
      2. 28.9.2. Establishing Data Bindings using Blend
      3. 28.9.3. The DataContext Property
      4. 28.9.4. Data Conversion Using IValueConverter
      5. 28.9.5. Establishing Data Bindings in Code
      6. 28.9.6. Building the DataGrid Tab
    10. 28.10. Summary
  34. 29. WPF Graphics Rendering Services
    1. 29.1. Understanding WPF's Graphical Rendering Services
      1. 29.1.1. WPF Graphical Rendering Options
    2. 29.2. Rendering Graphical Data Using Shapes
      1. 29.2.1. Adding Rectangles, Ellipses, and Lines to a Canvas
      2. 29.2.2. Removing Rectangles, Ellipses, and Lines from a Canvas
      3. 29.2.3. Working with Polylines and Polygons
      4. 29.2.4. Working with Paths
        1. 29.2.4.1. The Path "Modeling Mini Language"
    3. 29.3. WPF Brushes and Pens
      1. 29.3.1. Configuring Brushes Using Visual Studio 2010
      2. 29.3.2. Configuring Brushes in Code
      3. 29.3.3. Configuring Pens
    4. 29.4. Applying Graphical Transformations
      1. 29.4.1. A First Look at Transformations
      2. 29.4.2. Transforming our Canvas Data
    5. 29.5. Working with Shapes using Expression Blend
      1. 29.5.1. Selecting a Shape to Render from the Tool Palette
      2. 29.5.2. Converting Shapes to Paths
      3. 29.5.3. Combining Shapes
      4. 29.5.4. The Brush and Transformation Editors
    6. 29.6. Rendering Graphical Data Using Drawings and Geometries
      1. 29.6.1. Building a DrawingBrush using Geometries
      2. 29.6.2. Painting with the DrawingBrush
      3. 29.6.3. Containing Drawing Types in a DrawingImage
    7. 29.7. Generating Complex Vector Graphics using Expression Design
      1. 29.7.1. Exporting a Design Document to XAML
    8. 29.8. Rendering Graphical Data Using the Visual Layer
      1. 29.8.1.
        1. 29.8.1.1. The Visual Base Class and Derived Child Classes
        2. 29.8.1.2. A First Look at using the DrawingVisual Class
        3. 29.8.1.3. Rendering Visual Data to a Custom Layout Manager
        4. 29.8.1.4. Responding to Hit Test Operations
    9. 29.9. Summary
  35. 30. WPF Resources, Animations, and Styles
    1. 30.1. Understanding the WPF Resource System
      1. 30.1.1. Working with Binary Resources
        1. 30.1.1.1. Including Loose Resource Files in a Project
        2. 30.1.1.2. Configuring the Loose Resources
        3. 30.1.1.3. Programmatically Loading an Image
        4. 30.1.1.4. Embedding Application Resources
    2. 30.2. Working with Object (Logical) Resources
      1. 30.2.1. The Role of the Resources Property
      2. 30.2.2. Defining Window-Wide Resources
      3. 30.2.3. The {StaticResource} Markup Extension
      4. 30.2.4. Changing a Resource after Extraction
      5. 30.2.5. The {DynamicResource} Markup Extension
      6. 30.2.6. Application-Level Resources
      7. 30.2.7. Defining Merged Resource Dictionaries
      8. 30.2.8. Defining a Resource-Only Assembly
      9. 30.2.9. Extracting Resources in Expression Blend
    3. 30.3. Understanding WPF's Animation Services
      1. 30.3.1. The Role of the Animation Class Types
      2. 30.3.2. The To, From, and By Properties
      3. 30.3.3. The Role of the Timeline Base Class
      4. 30.3.4. Authoring an Animation in VB 2010 Code
      5. 30.3.5. Controlling the Pacing of an Animation
      6. 30.3.6. Reversing and Looping an Animation
    4. 30.4. Authoring Animations in XAML
      1. 30.4.1. The Role of Storyboards
      2. 30.4.2. The Role of Event Triggers
      3. 30.4.3. Animation Using Discrete Key Frames
    5. 30.5. Understanding the Role of WPF Styles
      1. 30.5.1. Defining and Applying a Style
      2. 30.5.2. Overriding Style Settings
      3. 30.5.3. Automatically Applying a Style with TargetType
      4. 30.5.4. Subclassing Existing Styles
      5. 30.5.5. The Role of Unnamed Styles
      6. 30.5.6. Defining Styles with Triggers
      7. 30.5.7. Defining Styles with Multiple Triggers
      8. 30.5.8. Animated Styles
      9. 30.5.9. Assigning Styles Programmatically
    6. 30.6. Generating Styles with Expression Blend
      1. 30.6.1. Working with Default Visual Styles
    7. 30.7. Summary
  36. 31. WPF Control Templates and UserControls
    1. 31.1. Understanding the Role of Dependency Properties
      1. 31.1.1. Examining an Existing Dependency Property
      2. 31.1.2. Important Notes Regarding CLR Property Wrappers
    2. 31.2. Building a Custom Dependency Property
      1. 31.2.1. Adding a Data Validation Routine
      2. 31.2.2. Responding to the Property Change
    3. 31.3. Understanding Routed Events
      1. 31.3.1. The Role of Routed Bubbling Events
      2. 31.3.2. Continuing or Halting Bubbling
      3. 31.3.3. The Role of Routed Tunneling Events
    4. 31.4. Logical Trees, Visual Trees and Default Templates
      1. 31.4.1. Programmatically Inspecting a Logical Tree
      2. 31.4.2. Programmatically Inspecting a Visual Tree
      3. 31.4.3. Programmatically Inspecting a Control's Default Template
    5. 31.5. Building a Custom Control Template with Visual Studio 2010
      1. 31.5.1. Templates as Resources
      2. 31.5.2. Incorporating Visual Cues using Triggers
      3. 31.5.3. The Role of {TemplateBinding} Markup Extension
      4. 31.5.4. The Role of ContentPresenter
      5. 31.5.5. Incorporating Templates into Styles
    6. 31.6. Building Custom UserControls with Blend
      1. 31.6.1. Creating a UserControl Library Project
        1. 31.6.1.1. Renaming the Initial UserControl
        2. 31.6.1.2. Designing the SpinControl
        3. 31.6.1.3. Adding the Initial VB 2010 Code
        4. 31.6.1.4. Defining an Animation using Blend
        5. 31.6.1.5. Programmatically Starting our Storyboard
    7. 31.7. Creating the Jackpot Deluxe WPF Application
      1. 31.7.1. Extracting a UserControl from a Drawing Geometry
      2. 31.7.2. The Role of .NET 4.0 Visual States
        1. 31.7.2.1. Defining Visual States for the StarButton Control
        2. 31.7.2.2. Defining State Transition Timings
        3. 31.7.2.3. Viewing the Generated XAML
        4. 31.7.2.4. Changing Visual States in Code using the VisualStateManager Class
      3. 31.7.3. Finalizing the Jackpot Deluxe Application
    8. 31.8. Summary
  37. 32. Building ASP.NET Web Pages
    1. 32.1. The Role of HTTP
      1. 32.1.1. The HTTP Request/Response Cycle
      2. 32.1.2. HTTP Is a Stateless Protocol
    2. 32.2. Understanding Web Applications and Web Servers
      1. 32.2.1. The Role of IIS Virtual Directories
      2. 32.2.2. The ASP.NET Development Web Server
    3. 32.3. The Role of HTML
      1. 32.3.1. HTML Document Structure
      2. 32.3.2. The Role of an HTML Form
      3. 32.3.3. The Visual Studio 2010 HTML Designer Tools
      4. 32.3.4. Building an HTML Form
    4. 32.4. The Role of Client-Side Scripting
      1. 32.4.1. A Client-Side Scripting Example
    5. 32.5. Posting Back to the Web Server
      1. 32.5.1. Postbacks under ASP.NET
    6. 32.6. The Feature Set of the ASP.NET API
      1. 32.6.1. Major Features of ASP.NET 1.0-1.1
      2. 32.6.2. Major Features of ASP.NET 2.0
      3. 32.6.3. Major Features of ASP.NET 3.5 (and .NET 3.5 SP1)
      4. 32.6.4. Major Features of ASP.NET 4.0
    7. 32.7. Building a Single File ASP.NET Web Page
      1. 32.7.1. Referencing AutoLotDAL.dll
      2. 32.7.2. Designing the UI
      3. 32.7.3. Adding the Data Access Logic
      4. 32.7.4. The Role of ASP.NET Directives
      5. 32.7.5. Analyzing the "Script" Block
      6. 32.7.6. Analyzing the ASP.NET Control Declarations
      7. 32.7.7. Compilation Cycle for Single-File Pages
    8. 32.8. Building an ASP.NET Web Page using Code Files
      1. 32.8.1. Referencing the AutoLotDAL.dll Assembly
      2. 32.8.2. Updating the Code File
      3. 32.8.3. Compilation Cycle for Multifile Pages
      4. 32.8.4. Debugging and Tracing ASP.NET Pages
    9. 32.9. ASP.NET Web Sites and ASP.NET Web Applications
    10. 32.10. The ASP.NET Web Site Directory Structure
      1. 32.10.1. Referencing Assemblies
      2. 32.10.2. The Role of the App_Code Folder
    11. 32.11. The Inheritance Chain of the Page Type
    12. 32.12. Interacting with the Incoming HTTP Request
      1. 32.12.1. Obtaining Brower Statistics
      2. 32.12.2. Access to Incoming Form Data
      3. 32.12.3. The IsPostBack Property
    13. 32.13. Interacting with the Outgoing HTTP Response
      1. 32.13.1. Emitting HTML Content
      2. 32.13.2. Redirecting Users
    14. 32.14. The Life Cycle of an ASP.NET Web Page
      1. 32.14.1. The Error Event
    15. 32.15. The Role of the Web.config File
      1. 32.15.1. The ASP.NET Website Administration Utility
    16. 32.16. Summary
  38. 33. ASP.NET Web Controls, Master Pages, and Themes
    1. 33.1. Understanding the Nature of Web Controls
      1. 33.1.1. Understanding Server-Side Event Handling
      2. 33.1.2. The AutoPostBack Property
    2. 33.2. The Control and WebControl Base Classes
      1. 33.2.1. Enumerating Contained Controls
      2. 33.2.2. Dynamically Adding and Removing Controls
      3. 33.2.3. Interacting with Dynamically Created Controls
      4. 33.2.4. Functionality of the WebControl Base Class
    3. 33.3. Major Categories of ASP.NET Web Controls
      1. 33.3.1. A Brief Word Regarding System.Web.UI.HtmlControls
      2. 33.3.2. Web Control Documentation
    4. 33.4. Building the ASP.NET Cars Web Site
      1. 33.4.1. Working with ASP.NET Master Pages
        1. 33.4.1.1. Working with the TreeView Control Site Navigation Logic
        2. 33.4.1.2. Establishing Bread Crumbs with the SiteMapPath Type
        3. 33.4.1.3. Working with the AdRotator
      2. 33.4.2. Defining the Default Content Page
      3. 33.4.3. Designing the Inventory Content Page
        1. 33.4.3.1. Enabling Sorting and Paging
        2. 33.4.3.2. Enabling In-Place Editing
      4. 33.4.4. Designing the Build-a-Car Content Page
    5. 33.5. The Role of the Validation Controls
      1. 33.5.1. The RequiredFieldValidator
      2. 33.5.2. The RegularExpressionValidator
      3. 33.5.3. The RangeValidator
      4. 33.5.4. The CompareValidator
      5. 33.5.5. Creating Validation Summaries
      6. 33.5.6. Defining Validation Groups
    6. 33.6. Working with Themes
      1. 33.6.1. Understanding *.skin Files
      2. 33.6.2. Applying Sitewide Themes
      3. 33.6.3. Applying Themes at the Page Level
      4. 33.6.4. The SkinID Property
      5. 33.6.5. Assigning Themes Programmatically
    7. 33.7. Summary
  39. 34. ASP.NET State Management Techniques
    1. 34.1. The Issue of State
    2. 34.2. ASP.NET State Management Techniques
    3. 34.3. Understanding the Role of ASP.NET View State
      1. 34.3.1. Demonstrating View State
      2. 34.3.2. Adding Custom View State Data
    4. 34.4. The Role of the Global.asax File
      1. 34.4.1. The Global Last-Chance Exception Event Handler
      2. 34.4.2. The HttpApplication Base Class
    5. 34.5. Understanding the Application/Session Distinction
      1. 34.5.1. Maintaining Application-Level State Data
      2. 34.5.2. Modifying Application Data
      3. 34.5.3. Handling Web Application Shutdown
    6. 34.6. Working with the Application Cache
      1. 34.6.1. Fun with Data Caching
      2. 34.6.2. Modifying the *.aspx File
    7. 34.7. Maintaining Session Data
      1. 34.7.1. Additional Members of HttpSessionState
    8. 34.8. Understanding Cookies
      1. 34.8.1. Creating Cookies
      2. 34.8.2. Reading Incoming Cookie Data
    9. 34.9. The Role of the <sessionState> Element
      1. 34.9.1. Storing Session Data in the ASP.NET Session State Server
      2. 34.9.2. Storing Session Data in a Dedicated Database
    10. 34.10. Understanding the ASP.NET Profile API
      1. 34.10.1. The ASPNETDB.mdf Database
      2. 34.10.2. Defining a User Profile Within Web.config
      3. 34.10.3. Accessing Profile Data Programmatically
      4. 34.10.4. Grouping Profile Data and Persisting Custom Objects
    11. 34.11. Summary
  40. A. Programming with Windows Forms
    1. A.1. The Windows Forms Namespaces
    2. A.2. Building a Simple Windows Forms Application
      1. A.2.1. Populating the Controls Collection
      2. A.2.2. The Role of System.EventArgs and System.EventHandler
    3. A.3. The Visual Studio Windows Forms Project Template
      1. A.3.1. The Visual Designer Surface
      2. A.3.2. Dissecting the Initial Form
      3. A.3.3. Visually Building a Menu System
      4. A.3.4. The System.EventHandler Delegate
    4. A.4. The Anatomy of a Form
      1. A.4.1. The Functionality of the Control Class
      2. A.4.2. The Functionality of the Form Class
      3. A.4.3. The Life Cycle of a Form Type
    5. A.5. Responding to Mouse and Keyboard Activity
      1. A.5.1. Determining Which Mouse Button Was Clicked
      2. A.5.2. Determining Which Key Was Pressed
    6. A.6. Designing Dialog Boxes
      1. A.6.1. The DialogResult Property
      2. A.6.2. Configuring the Tab Order
      3. A.6.3. The Tab Order Wizard
      4. A.6.4. Setting the Form's Default Input Button
      5. A.6.5. Displaying Dialog Boxes
      6. A.6.6. Understanding Form Inheritance
    7. A.7. Rendering Graphical Data Using GDI+
      1. A.7.1. The System.Drawing Namespace
      2. A.7.2. The Role of the Graphics Type
      3. A.7.3. Obtaining a Graphics Object with the Paint Event
      4. A.7.4. Invalidating the Form's Client Area
    8. A.8. Building a Complete Windows Forms Application
      1. A.8.1. Building the Main Menu System
      2. A.8.2. Defining the ShapeData Type
      3. A.8.3. Defining the ShapePickerDialog Type
      4. A.8.4. Adding Infrastructure to the MainWindow Type
      5. A.8.5. Implementing the Tools Menu Functionality
      6. A.8.6. Capturing and Rendering the Graphical Output
      7. A.8.7. Implementing the Serialization Logic
    9. A.9. Summary
  41. B. Platform-Independent .NET Development with Mono
    1. B.1. The Platform-Independent Nature of .NET
      1. B.1.1. The Role of the CLI
      2. B.1.2. The Mainstream CLI Distributions
      3. B.1.3. The Scope of Mono
    2. B.2. Obtaining and Installing Mono
      1. B.2.1. Examining Mono's Directory Structure
    3. B.3. The Mono Development Languages
      1. B.3.1. Working with the VB 2010 Compiler
      2. B.3.2. Building Mono Applications using MonoDevelop
    4. B.4. Microsoft-Compatible Mono Development Tools
      1. B.4.1. Mono-Specific Development Tools
        1. B.4.1.1. Using monop
    5. B.5. Building .NET Applications with Mono
      1. B.5.1. Building a Mono Code Library
        1. B.5.1.1. Assigning CoreLibDumper.dll a Strong Name
        2. B.5.1.2. Viewing the Updated Manifest with monodis
        3. B.5.1.3. Installing Assemblies into the Mono GAC
      2. B.5.2. Building a Console Application in Mono
        1. B.5.2.1. Loading Your Client Application in the Mono Runtime
        2. B.5.2.2. Executing Your Windows Forms Application Under Linux
    6. B.6. Who is Using Mono?
    7. B.7. Suggestions for Further Study
    8. B.8. Summary