Professional C# 4 and .NET 4

Book description

This book starts by reviewing the overall architecture of .NET in order to give you the background you need to be able to write managed code. After that, the book is divided into a number of sections that cover both the C# language and its application in a variety of areas.

Part I: The C# Language: This section gives a good grounding in the C# language itself. This section doesn't presume knowledge of any particular language, although it does assume you are an experienced programmer. You start by looking at C's basic syntax and data types, and then explore the object-oriented features of C# before moving on to look at more advanced C# programming topics. Objects, types, inheritance, generics, arrays, tuples, operators, casts, delegates, lambdas, events, strings, regular expressions, collections, Language Integrated, Query (LINQ), Dynamic Language Extensions, memory management, pointers, reflection, errors, and exception are all covered in part 1.

Part II: Visual Studio: This section looks at the main IDE utilized by C# developers worldwide: Visual Studio 2010. The two chapters in this section look at the best way to use the tool to build applications based on the .NET Framework 4. In addition, this section also focuses on the deployment of your projects.

art III: Foundation: In this section, you look at the principles of programming in the .NET environment. In particular, you look at assemblies, instrumentation, security, threading, tasks, synchronization, localization, System.Transactions, networking, interop, XAML, Managed Extensibility Framework, Manipulating Files and the Registry, transactions, how to build Windows services, and how to generate your own libraries as assemblies, among other topics.

Part IV: Data: Here, you look at accessing databases with ADO.NET, ADO.NET Entity Framework, data services. This part also extensively covers support in .NET for XML and on the Windows operating system side, and the .NET features of SQL Server 2008.

Part V: Presentation: This section shows how to build applications based upon the Windows Presentation Foundation and Silverlight, and covers writing components that will run on web sites, serving up web pages. It also has coverage on building classic Windows applications, which are called Windows Forms in .NET. Windows Forms are the thick-client version of applications, and using .NET to build these types of applications is a quick and easy way of accomplishing this task. Finally, it includes coverage of the tremendous number of features that ASP.NET, ASP.NET MVC, and ASP.Net Dynamic Data provide.

art VI: Communication: This section is all about communication. It covers services for platform-independent communication using the Windows Communication Foundation (WCF). With Message Queuing, asynchronous disconnected communication is shown. This section looks at utilizing the Windows Workflow Foundation 4, as well as peer to peer networking, and creating syndication feeds.

The book closes with an appendix covering Windows 7 and Windows Server 2008 R2 development.

Online Chapters: Even with such a large book, we can't fit in everything we'd like to tell you about C# and using this language with other .NET technologies, so we've made ten additional chapters available online at wrox.com. These chapters include information on a variety of topics: GDI+, which is a technology that is used for building applications that include advanced graphics; .Visual Studio Tools for Office (VSTO); NET Remoting for communication between .NET clients and servers; Enterprise Services for the services in the background; web services with ASP.NET, LINQ to SQL, Windows Workflow Foundation 3.0, and the Managed Add-In Framework (MAF). It also includes examples showing .NET 4 in others supported languages including Visual Basic, C++/CLI, and F#.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

Table of contents

  1. Copyright
  2. ABOUT THE AUTHORS
  3. ABOUT THE TECHNICAL EDITORS
  4. CREDITS
  5. ACKNOWLEDGMENTS
  6. INTRODUCTION
    1. THE SIGNIFICANCE OF .NET AND C#
    2. ADVANTAGES OF .NET
    3. WHAT'S NEW IN THE .NET FRAMEWORK 4
      1. Dynamic Typing
      2. Optional and Named Parameters
      3. Covariance and Contravariance
    4. ASP.NET MVC
    5. WHERE C# FITS IN
    6. WHAT YOU NEED TO WRITE AND RUN C# CODE
    7. WHAT THIS BOOK COVERS
      1. Part I: The C# Language
      2. Part II: Visual Studio
      3. Part III: Foundation
      4. Part IV: Data
      5. Part V: Presentation
      6. Part VI: Communication
      7. Appendix
      8. Online Chapters
    8. CONVENTIONS
    9. SOURCE CODE
    10. ERRATA
    11. P2P.WROX.COM
  7. I. The C# Language
    1. 1. .NET Architecture
      1. 1.1. THE RELATIONSHIP OF C# TO .NET
      2. 1.2. THE COMMON LANGUAGE RUNTIME
        1. 1.2.1. Platform Independence
        2. 1.2.2. Performance Improvement
        3. 1.2.3. Language Interoperability
          1. 1.2.3.1. Visual Basic 2010
          2. 1.2.3.2. Visual C++ 2010
          3. 1.2.3.3. COM and COM+
      3. 1.3. A CLOSER LOOK AT INTERMEDIATE LANGUAGE
        1. 1.3.1. Support for Object Orientation and Interfaces
        2. 1.3.2. Distinct Value and Reference Types
        3. 1.3.3. Strong Data Typing
          1. 1.3.3.1. Strong Data Typing as a Key to Language Interoperability
          2. 1.3.3.2. Common Type System
          3. 1.3.3.3. Common Language Specification
          4. 1.3.3.4. Garbage Collection
          5. 1.3.3.5. Security
          6. 1.3.3.6. Application Domains
        4. 1.3.4. Error Handling with Exceptions
        5. 1.3.5. Use of Attributes
      4. 1.4. ASSEMBLIES
        1. 1.4.1. Private Assemblies
        2. 1.4.2. Shared Assemblies
        3. 1.4.3. Reflection
        4. 1.4.4. Parallel Programming
      5. 1.5. .NET FRAMEWORK CLASSES
      6. 1.6. NAMESPACES
      7. 1.7. CREATING .NET APPLICATIONS USING C#
        1. 1.7.1. Creating ASP.NET Applications
          1. 1.7.1.1. Features of ASP.NET
          2. 1.7.1.2. Web Forms
          3. 1.7.1.3. Web Server Controls
          4. 1.7.1.4. XML Web Services
        2. 1.7.2. Creating Windows Forms
        3. 1.7.3. Using the Windows Presentation Foundation (WPF)
        4. 1.7.4. Windows Controls
        5. 1.7.5. Windows Services
        6. 1.7.6. Windows Communication Foundation
        7. 1.7.7. Windows Workflow Foundation
      8. 1.8. THE ROLE OF C# IN THE .NET ENTERPRISE ARCHITECTURE
      9. 1.9. SUMMARY
    2. 2. Core C#
      1. 2.1. YOUR FIRST C# PROGRAM
        1. 2.1.1. The Code
        2. 2.1.2. Compiling and Running the Program
        3. 2.1.3. A Closer Look
      2. 2.2. VARIABLES
        1. 2.2.1. Initialization of Variables
        2. 2.2.2. Type Inference
        3. 2.2.3. Variable Scope
          1. 2.2.3.1. Scope Clashes for Local Variables
          2. 2.2.3.2. Scope Clashes for Fields and Local Variables
        4. 2.2.4. Constants
      3. 2.3. PREDEFINED DATA TYPES
        1. 2.3.1. Value Types and Reference Types
        2. 2.3.2. CTS Types
        3. 2.3.3. Predefined Value Types
          1. 2.3.3.1. Integer Types
          2. 2.3.3.2. Floating-Point Types
          3. 2.3.3.3. The Decimal Type
          4. 2.3.3.4. The Boolean Type
          5. 2.3.3.5. The Character Type
        4. 2.3.4. Predefined Reference Types
          1. 2.3.4.1. The object Type
          2. 2.3.4.2. The string Type
      4. 2.4. FLOW CONTROL
        1. 2.4.1. Conditional Statements
          1. 2.4.1.1. The if Statement
          2. 2.4.1.2. The switch Statement
        2. 2.4.2. Loops
          1. 2.4.2.1. The for Loop
          2. 2.4.2.2. The while Loop
          3. 2.4.2.3. The do ... while Loop
          4. 2.4.2.4. The foreach Loop
        3. 2.4.3. Jump Statements
          1. 2.4.3.1. The goto Statement
          2. 2.4.3.2. The break Statement
          3. 2.4.3.3. The continue Statement
          4. 2.4.3.4. The return Statement
      5. 2.5. ENUMERATIONS
      6. 2.6. NAMESPACES
        1. 2.6.1. The using Directive
        2. 2.6.2. Namespace Aliases
      7. 2.7. THE MAIN() METHOD
        1. 2.7.1. Multiple Main() Methods
        2. 2.7.2. Passing Arguments to Main()
      8. 2.8. MORE ON COMPILING C# FILES
      9. 2.9. CONSOLE I/O
      10. 2.10. USING COMMENTS
        1. 2.10.1. Internal Comments within the Source Files
        2. 2.10.2. XML Documentation
      11. 2.11. THE C# PREPROCESSOR DIRECTIVES
        1. 2.11.1. #define and #undef
        2. 2.11.2. #if, #elif, #else, and #endif
        3. 2.11.3. #warning and #error
        4. 2.11.4. #region and #endregion
        5. 2.11.5. #line
        6. 2.11.6. #pragma
      12. 2.12. C# PROGRAMMING GUIDELINES
        1. 2.12.1. Rules for Identifiers
        2. 2.12.2. Usage Conventions
          1. 2.12.2.1. Naming Conventions
          2. 2.12.2.2. Casing of Names
          3. 2.12.2.3. Name Styles
          4. 2.12.2.4. Namespace Names
          5. 2.12.2.5. Names and Keywords
          6. 2.12.2.6. Use of Properties and Methods
          7. 2.12.2.7. Use of Fields
      13. 2.13. SUMMARY
    3. 3. Objects and Types
      1. 3.1. CLASSES AND STRUCTS
      2. 3.2. CLASSES
        1. 3.2.1. Data Members
        2. 3.2.2. Function Members
          1. 3.2.2.1. Methods
            1. 3.2.2.1.1. Declaring Methods
            2. 3.2.2.1.2. Invoking Methods
            3. 3.2.2.1.3. Passing Parameters to Methods
            4. 3.2.2.1.4. ref Parameters
            5. 3.2.2.1.5. out Parameters
            6. 3.2.2.1.6. Named Arguments
            7. 3.2.2.1.7. Optional Arguments
            8. 3.2.2.1.8. Method Overloading
            9. 3.2.2.1.9. Properties
            10. 3.2.2.1.10. Read-Only and Write-Only Properties
            11. 3.2.2.1.11. Access Modifiers for Properties
            12. 3.2.2.1.12. Auto-Implemented Properties
          2. 3.2.2.2. Constructors
            1. 3.2.2.2.1. Static Constructors
            2. 3.2.2.2.2. Calling Constructors from Other Constructors
        3. 3.2.3. readonly Fields
      3. 3.3. ANONYMOUS TYPES
      4. 3.4. STRUCTS
        1. 3.4.1. Structs Are Value Types
        2. 3.4.2. Structs and Inheritance
        3. 3.4.3. Constructors for Structs
      5. 3.5. PARTIAL CLASSES
      6. 3.6. STATIC CLASSES
      7. 3.7. THE OBJECT CLASS
        1. 3.7.1. System.Object Methods
        2. 3.7.2. The ToString() Method
      8. 3.8. EXTENSION METHODS
      9. 3.9. SUMMARY
    4. 4. Inheritance
      1. 4.1. TYPES OF INHERITANCE
        1. 4.1.1. Implementation Versus Interface Inheritance
        2. 4.1.2. Multiple Inheritance
        3. 4.1.3. Structs and Classes
      2. 4.2. IMPLEMENTATION INHERITANCE
        1. 4.2.1. Virtual Methods
        2. 4.2.2. Hiding Methods
        3. 4.2.3. Calling Base Versions of Functions
        4. 4.2.4. Abstract Classes and Functions
        5. 4.2.5. Sealed Classes and Methods
        6. 4.2.6. Constructors of Derived Classes
          1. 4.2.6.1. Adding a Constructor in a Hierarchy
          2. 4.2.6.2. Adding Constructors with Parameters to a Hierarchy
      3. 4.3. MODIFIERS
        1. 4.3.1. Visibility Modifiers
        2. 4.3.2. Other Modifiers
      4. 4.4. INTERFACES
        1. 4.4.1. Defining and Implementing Interfaces
        2. 4.4.2. Derived Interfaces
      5. 4.5. SUMMARY
    5. 5. Generics
      1. 5.1. GENERICS OVERVIEW
        1. 5.1.1. Performance
        2. 5.1.2. Type Safety
        3. 5.1.3. Binary Code Reuse
        4. 5.1.4. Code Bloat
        5. 5.1.5. Naming Guidelines
      2. 5.2. CREATING GENERIC CLASSES
      3. 5.3. GENERICS FEATURES
        1. 5.3.1. Default Values
        2. 5.3.2. Constraints
        3. 5.3.3. Inheritance
        4. 5.3.4. Static Members
      4. 5.4. GENERIC INTERFACES
        1. 5.4.1. Covariance and Contra-variance
        2. 5.4.2. Covariance with Generic Interfaces
        3. 5.4.3. Contra-Variance with Generic Interfaces
      5. 5.5. GENERIC STRUCTS
      6. 5.6. GENERIC METHODS
        1. 5.6.1. Generic Methods Example
        2. 5.6.2. Generic Methods with Constraints
        3. 5.6.3. Generic Methods with Delegates
        4. 5.6.4. Generic Methods Specialization
      7. 5.7. SUMMARY
    6. 6. Arrays and Tuples
      1. 6.1. SIMPLE ARRAYS
        1. 6.1.1. Array Declaration
        2. 6.1.2. Array Initialization
        3. 6.1.3. Accessing Array Elements
        4. 6.1.4. Using Reference Types
      2. 6.2. MULTIDIMENSIONAL ARRAYS
      3. 6.3. JAGGED ARRAYS
      4. 6.4. ARRAY CLASS
        1. 6.4.1. Creating Arrays
        2. 6.4.2. Copying Arrays
        3. 6.4.3. Sorting
      5. 6.5. ARRAYS AS PARAMETERS
        1. 6.5.1. Array Covariance
        2. 6.5.2. ArraySegment<T>
      6. 6.6. ENUMERATIONS
        1. 6.6.1. IEnumerator Interface
        2. 6.6.2. foreach Statement
        3. 6.6.3. yield Statement
          1. 6.6.3.1. Different Ways to Iterate Through Collections
          2. 6.6.3.2. Returning Enumerators with Yield Return
      7. 6.7. TUPLES
      8. 6.8. STRUCTURAL COMPARISON
      9. 6.9. SUMMARY
    7. 7. Operators and Casts
      1. 7.1. OPERATORS
        1. 7.1.1. Operator Shortcuts
          1. 7.1.1.1. The Conditional Operator
          2. 7.1.1.2. The checked and unchecked Operators
          3. 7.1.1.3. The is Operator
          4. 7.1.1.4. The as Operator
          5. 7.1.1.5. The sizeof Operator
          6. 7.1.1.6. The typeof Operator
          7. 7.1.1.7. Nullable Types and Operators
          8. 7.1.1.8. The Null Coalescing Operator
        2. 7.1.2. Operator Precedence
      2. 7.2. TYPE SAFETY
        1. 7.2.1. Type Conversions
          1. 7.2.1.1. Implicit Conversions
          2. 7.2.1.2. Explicit Conversions
        2. 7.2.2. Boxing and Unboxing
      3. 7.3. COMPARING OBJECTS FOR EQUALITY
        1. 7.3.1. Comparing Reference Types for Equality
          1. 7.3.1.1. The ReferenceEquals() Method
          2. 7.3.1.2. The virtual Equals() Method
          3. 7.3.1.3. The static Equals() Method
          4. 7.3.1.4. Comparison Operator (==)
        2. 7.3.2. Comparing Value Types for Equality
      4. 7.4. OPERATOR OVERLOADING
        1. 7.4.1. How Operators Work
        2. 7.4.2. Operator Overloading Example: The Vector Struct
          1. 7.4.2.1. Adding More Overloads
          2. 7.4.2.2. Overloading the Comparison Operators
        3. 7.4.3. Which Operators Can You Overload?
      5. 7.5. USER-DEFINED CASTS
        1. 7.5.1. Implementing User-Defined Casts
          1. 7.5.1.1. Casts Between Classes
          2. 7.5.1.2. Casts Between Base and Derived Classes
          3. 7.5.1.3. Boxing and Unboxing Casts
        2. 7.5.2. Multiple Casting
      6. 7.6. SUMMARY
    8. 8. Delegates, Lambdas, and Events
      1. 8.1. DELEGATES
        1. 8.1.1. Declaring Delegates
        2. 8.1.2. Using Delegates
        3. 8.1.3. Simple Delegate Example
        4. 8.1.4. Action<T> and Func<T> Delegates
        5. 8.1.5. BubbleSorter Example
        6. 8.1.6. Multicast Delegates
        7. 8.1.7. Anonymous Methods
      2. 8.2. LAMBDA EXPRESSIONS
        1. 8.2.1. Parameters
        2. 8.2.2. Multiple Code Lines
        3. 8.2.3. Variables Outside of the Lambda Expression
      3. 8.3. EVENTS
        1. 8.3.1. Event Publisher
        2. 8.3.2. Event Listener
        3. 8.3.3. Weak Events
          1. 8.3.3.1. Weak Event Manager
          2. 8.3.3.2. Event Listener
      4. 8.4. SUMMARY
    9. 9. Strings and Regular Expressions
      1. 9.1. EXAMINING SYSTEM.STRING
        1. 9.1.1. Building Strings
        2. 9.1.2. StringBuilder Members
        3. 9.1.3. Format Strings
          1. 9.1.3.1. How the String Is Formatted
          2. 9.1.3.2. The FormattableVector Example
      2. 9.2. REGULAR EXPRESSIONS
        1. 9.2.1. Introduction to Regular Expressions
        2. 9.2.2. The RegularExpressionsPlayaround Example
        3. 9.2.3. Displaying Results
        4. 9.2.4. Matches, Groups, and Captures
      3. 9.3. SUMMARY
    10. 10. Collections
      1. 10.1. COLLECTION INTERFACES AND TYPES
      2. 10.2. LISTS
        1. 10.2.1. Creating Lists
          1. 10.2.1.1. Collection Initializers
          2. 10.2.1.2. Adding Elements
          3. 10.2.1.3. Inserting Elements
          4. 10.2.1.4. Accessing Elements
          5. 10.2.1.5. Removing Elements
          6. 10.2.1.6. Searching
          7. 10.2.1.7. Sorting
          8. 10.2.1.8. Type Conversion
        2. 10.2.2. Read-Only Collections
      3. 10.3. QUEUE
      4. 10.4. STACK
      5. 10.5. LINKED LIST
      6. 10.6. SORTED LIST
      7. 10.7. DICTIONARIES
        1. 10.7.1. Key Type
        2. 10.7.2. Dictionary Example
        3. 10.7.3. Lookup
        4. 10.7.4. Sorted Dictionary
      8. 10.8. SETS
      9. 10.9. OBSERVABLE COLLECTION
      10. 10.10. BIT ARRAYS
        1. 10.10.1. BitArray
        2. 10.10.2. BitVector32
      11. 10.11. CONCURRENT COLLECTIONS
      12. 10.12. PERFORMANCE
      13. 10.13. SUMMARY
    11. 11. Language Integrated Query
      1. 11.1. LINQ OVERVIEW
        1. 11.1.1. Lists and Entities
      2. 11.2. LINQ Query
        1. 11.2.1. Extension Methods
        2. 11.2.2. Deferred Query Execution
      3. 11.3. STANDARD QUERY OPERATORS
        1. 11.3.1. Filtering
        2. 11.3.2. Filtering with Index
        3. 11.3.3. Type Filtering
        4. 11.3.4. Compound from
        5. 11.3.5. Sorting
        6. 11.3.6. Grouping
        7. 11.3.7. Grouping with Nested Objects
        8. 11.3.8. Join
        9. 11.3.9. Set Operations
        10. 11.3.10. Zip
        11. 11.3.11. Partitioning
        12. 11.3.12. Aggregate Operators
        13. 11.3.13. Conversion
        14. 11.3.14. Generation Operators
      4. 11.4. PARALLEL LINQ
        1. 11.4.1. Parallel Queries
        2. 11.4.2. Partitioners
        3. 11.4.3. Cancellation
      5. 11.5. EXPRESSION TREES
      6. 11.6. LINQ PROVIDERS
      7. 11.7. SUMMARY
    12. 12. Dynamic Language Extensions
      1. 12.1. DYNAMIC LANGUAGE RUNTIME
      2. 12.2. THE DYNAMIC TYPE
        1. 12.2.1. Dynamic Behind the Scenes
      3. 12.3. HOSTING THE DLR SCRIPTRUNTIME
      4. 12.4. DYNAMICOBJECT AND EXPANDOOBJECT
        1. 12.4.1. DynamicObject
        2. 12.4.2. ExpandoObject
      5. 12.5. SUMMARY
    13. 13. Memory Management and Pointers
      1. 13.1. MEMORY MANAGEMENT UNDER THE HOOD
        1. 13.1.1. Value Data Types
        2. 13.1.2. Reference Data Types
        3. 13.1.3. Garbage Collection
      2. 13.2. FREEING UNMANAGED RESOURCES
        1. 13.2.1. Destructors
        2. 13.2.2. The IDisposable Interface
        3. 13.2.3. Implementing IDisposable and a Destructor
      3. 13.3. UNSAFE CODE
        1. 13.3.1. Accessing Memory Directly with Pointers
          1. 13.3.1.1. Writing Unsafe Code with the unsafe Keyword
          2. 13.3.1.2. Pointer Syntax
          3. 13.3.1.3. Casting Pointers to Integer Types
          4. 13.3.1.4. Casting Between Pointer Types
          5. 13.3.1.5. void Pointers
          6. 13.3.1.6. Pointer Arithmetic
          7. 13.3.1.7. The sizeof Operator
          8. 13.3.1.8. Pointers to Structs: The Pointer Member Access Operator
          9. 13.3.1.9. Pointers to Class Members
        2. 13.3.2. Pointer Example: PointerPlayground
        3. 13.3.3. Using Pointers to Optimize Performance
          1. 13.3.3.1. Creating Stack-Based Arrays
          2. 13.3.3.2. QuickArray Example
      4. 13.4. SUMMARY
    14. 14. Reflection
      1. 14.1. CUSTOM ATTRIBUTES
        1. 14.1.1. Writing Custom Attributes
          1. 14.1.1.1. AttributeUsage Attribute
          2. 14.1.1.2. Specifying Attribute Parameters
          3. 14.1.1.3. Specifying Optional Attribute Parameters
        2. 14.1.2. Custom Attribute Example: WhatsNewAttributes
          1. 14.1.2.1. The WhatsNewAttributes Library Assembly
          2. 14.1.2.2. The VectorClass Assembly
      2. 14.2. USING REFLECTION
        1. 14.2.1. The System.Type Class
          1. 14.2.1.1. Type Properties
          2. 14.2.1.2. Methods
        2. 14.2.2. The TypeView Example
        3. 14.2.3. The Assembly Class
          1. 14.2.3.1. Finding Out About Types Defined in an Assembly
          2. 14.2.3.2. Finding Out About Custom Attributes
        4. 14.2.4. Completing the WhatsNewAttributes Example
      3. 14.3. SUMMARY
    15. 15. Errors and Exceptions
      1. 15.1. EXCEPTION CLASSES
      2. 15.2. CATCHING EXCEPTIONS
        1. 15.2.1. Implementing Multiple Catch Blocks
        2. 15.2.2. Catching Exceptions from Other Code
        3. 15.2.3. System.Exception Properties
        4. 15.2.4. What Happens If an Exception Isn't Handled?
        5. 15.2.5. Nested try Blocks
          1. 15.2.5.1. Modifying the Type of Exception
          2. 15.2.5.2. Handling Different Exceptions in Different Places
      3. 15.3. USER-DEFINED EXCEPTION CLASSES
        1. 15.3.1. Catching the User-Defined Exceptions
        2. 15.3.2. Throwing the User-Defined Exceptions
        3. 15.3.3. Defining the User-Defined Exception Classes
      4. 15.4. SUMMARY
  8. II. Visual Studio
    1. 16. Visual Studio 2010
      1. 16.1. WORKING WITH VISUAL STUDIO 2010
        1. 16.1.1. Creating a Project
          1. 16.1.1.1. Selecting a Project Type
          2. 16.1.1.2. Reviewing the Newly Created Console Project
          3. 16.1.1.3. Viewing Other Project Files
        2. 16.1.2. Distinguishing Projects from Solutions
          1. 16.1.2.1. Adding Another Project to the Solution
          2. 16.1.2.2. Setting the Startup Project
        3. 16.1.3. Windows Application Code
        4. 16.1.4. Exploring and Coding a Project
          1. 16.1.4.1. The Folding Editor
          2. 16.1.4.2. Other Windows
            1. 16.1.4.2.1. The Design View Window
            2. 16.1.4.2.2. The Properties Window
            3. 16.1.4.2.3. The Class View Window
            4. 16.1.4.2.4. The Object Browser Window
            5. 16.1.4.2.5. The Server Explorer Window
          3. 16.1.4.3. Pin Buttons
        5. 16.1.5. Building a Project
          1. 16.1.5.1. Building, Compiling, and Making
          2. 16.1.5.2. Debugging and Release Builds
            1. 16.1.5.2.1. Optimization
            2. 16.1.5.2.2. Debugger Symbols
            3. 16.1.5.2.3. Extra Source Code Debugging Commands
          3. 16.1.5.3. Selecting a Configuration
          4. 16.1.5.4. Editing Configurations
        6. 16.1.6. Debugging Your Code
          1. 16.1.6.1. Breakpoints
          2. 16.1.6.2. Watches
          3. 16.1.6.3. Exceptions
      2. 16.2. REFACTORING TOOLS
      3. 16.3. MULTI-TARGETING THE .NET FRAMEWORK
      4. 16.4. WPF, WCF, WF, AND MORE
        1. 16.4.1. Building WPF Applications in Visual Studio 2010
        2. 16.4.2. Building WF Applications in Visual Studio 2010
      5. 16.5. SUMMARY
    2. 17. Deployment
      1. 17.1. PLANNING FOR DEPLOYMENT
        1. 17.1.1. Deployment Options
        2. 17.1.2. Deployment Requirements
        3. 17.1.3. Deploying the .NET Runtime
      2. 17.2. SIMPLE DEPLOYMENT OPTIONS
        1. 17.2.1. Xcopy Deployment
        2. 17.2.2. Xcopy and Web Applications
        3. 17.2.3. Publishing a Web Site
      3. 17.3. VISUAL STUDIO 2010 SETUP AND DEPLOYMENT PROJECTS
        1. 17.3.1. What is Windows Installer?
        2. 17.3.2. Creating Installers
          1. 17.3.2.1. Simple Client Application
          2. 17.3.2.2. Same Solution Project
          3. 17.3.2.3. Simple Web Application
          4. 17.3.2.4. Client from Web Server
      4. 17.4. CLICKONCE
        1. 17.4.1. ClickOnce Operation
        2. 17.4.2. Publishing a ClickOnce Application
        3. 17.4.3. ClickOnce Settings
        4. 17.4.4. Application Cache for ClickOnce Files
        5. 17.4.5. Application Security
      5. 17.5. VISUAL STUDIO 2010 EDITORS
        1. 17.5.1. File System Editor
        2. 17.5.2. Registry Editor
        3. 17.5.3. File Types Editor
        4. 17.5.4. User Interface Editor
        5. 17.5.5. Custom Actions Editor
        6. 17.5.6. Launch Conditions Editor
      6. 17.6. SUMMARY
  9. III. Foundation
    1. 18. Assemblies
      1. 18.1. WHAT ARE ASSEMBLIES?
        1. 18.1.1. Assembly Features
        2. 18.1.2. Assembly Structure
        3. 18.1.3. Assembly Manifests
        4. 18.1.4. Namespaces, Assemblies, and Components
        5. 18.1.5. Private and Shared Assemblies
        6. 18.1.6. Satellite Assemblies
        7. 18.1.7. Viewing Assemblies
      2. 18.2. CREATING ASSEMBLIES
        1. 18.2.1. Creating Modules and Assemblies
        2. 18.2.2. Assembly Attributes
        3. 18.2.3. Creating and Loading Assemblies Dynamically
      3. 18.3. APPLICATION DOMAINS
      4. 18.4. SHARED ASSEMBLIES
        1. 18.4.1. Strong Names
        2. 18.4.2. Integrity Using Strong Names
        3. 18.4.3. Global Assembly Cache
        4. 18.4.4. Creating a Shared Assembly
        5. 18.4.5. Create a Strong Name
        6. 18.4.6. Installing the Shared Assembly
        7. 18.4.7. Using the Shared Assembly
        8. 18.4.8. Delayed Signing of Assemblies
        9. 18.4.9. References
        10. 18.4.10. Native Image Generator
      5. 18.5. CONFIGURING .NET APPLICATIONS
        1. 18.5.1. Configuration Categories
        2. 18.5.2. Binding to Assemblies
          1. 18.5.2.1. <codeBase>
          2. 18.5.2.2. <probing>
      6. 18.6. VERSIONING
        1. 18.6.1. Version Numbers
        2. 18.6.2. Getting the Version Programmatically
        3. 18.6.3. Binding to Assembly Versions
        4. 18.6.4. Publisher Policy Files
          1. 18.6.4.1. Create a Publisher Policy File
          2. 18.6.4.2. Create a Publisher Policy Assembly
          3. 18.6.4.3. Add the Publisher Policy Assembly to the GAC
          4. 18.6.4.4. Overriding Publisher Policies
        5. 18.6.5. Runtime Version
      7. 18.7. SUMMARY
    2. 19. Instrumentation
      1. 19.1. CODE CONTRACTS
        1. 19.1.1. Preconditions
        2. 19.1.2. Postconditions
        3. 19.1.3. Invariants
        4. 19.1.4. Contracts for Interfaces
      2. 19.2. TRACING
        1. 19.2.1. Trace Sources
        2. 19.2.2. Trace Switches
        3. 19.2.3. Trace Listeners
        4. 19.2.4. Filters
        5. 19.2.5. Correlation
      3. 19.3. EVENT LOGGING
        1. 19.3.1. Event-Logging Architecture
        2. 19.3.2. Event-Logging Classes
        3. 19.3.3. Creating an Event Source
        4. 19.3.4. Writing Event Logs
        5. 19.3.5. Resource Files
      4. 19.4. PERFORMANCE MONITORING
        1. 19.4.1. Performance-Monitoring Classes
        2. 19.4.2. Performance Counter Builder
        3. 19.4.3. Adding PerformanceCounter Components
        4. 19.4.4. perfmon.exe
      5. 19.5. SUMMARY
    3. 20. Threads, Tasks, and Synchronization
      1. 20.1. OVERVIEW
      2. 20.2. ASYNCHRONOUS DELEGATES
        1. 20.2.1. Polling
        2. 20.2.2. Wait Handle
        3. 20.2.3. Asynchronous Callback
      3. 20.3. THE THREAD CLASS
        1. 20.3.1. Passing Data to Threads
        2. 20.3.2. Background Threads
        3. 20.3.3. Thread Priority
        4. 20.3.4. Controlling Threads
      4. 20.4. THREAD POOLS
      5. 20.5. TASKS
        1. 20.5.1. Starting Tasks
        2. 20.5.2. Continuation Tasks
        3. 20.5.3. Task Hierarchies
        4. 20.5.4. Results from Tasks
      6. 20.6. PARALLEL CLASS
        1. 20.6.1. Looping with the Parallel.For Method
        2. 20.6.2. Looping with the Parallel.ForEach Method
        3. 20.6.3. Invoking Multiple Methods with the Parallel.Invoke Method
      7. 20.7. CANCELLATION FRAMEWORK
        1. 20.7.1. Cancellation of Parallel.For
        2. 20.7.2. Cancellation of Tasks
      8. 20.8. THREADING ISSUES
        1. 20.8.1. Race Condition
        2. 20.8.2. Deadlock
      9. 20.9. SYNCHRONIZATION
        1. 20.9.1. lock Statement and Thread Safety
        2. 20.9.2. Interlocked
        3. 20.9.3. Monitor
        4. 20.9.4. SpinLock
        5. 20.9.5. WaitHandle
        6. 20.9.6. Mutex
        7. 20.9.7. Semaphore
        8. 20.9.8. Events
        9. 20.9.9. Barrier
        10. 20.9.10. ReaderWriterLockSlim
      10. 20.10. TIMERS
      11. 20.11. EVENT-BASED ASYNCHRONOUS PATTERN
        1. 20.11.1. BackgroundWorker
          1. 20.11.1.1. Enable Cancel
          2. 20.11.1.2. Enable Progress
        2. 20.11.2. Creating an Event-Based Asynchronous Component
      12. 20.12. SUMMARY
    4. 21. Security
      1. 21.1. AUTHENTICATION AND AUTHORIZATION
        1. 21.1.1. Identity and Principal
        2. 21.1.2. Roles
        3. 21.1.3. Declarative Role-Based Security
        4. 21.1.4. Client Application Services
          1. 21.1.4.1. Application Services
          2. 21.1.4.2. Client Application
      2. 21.2. ENCRYPTION
        1. 21.2.1. Signature
        2. 21.2.2. Key Exchange and Secure Transfer
      3. 21.3. ACCESS CONTROL TO RESOURCES
      4. 21.4. CODE ACCESS SECURITY
        1. 21.4.1. Security Transparency Level 2
        2. 21.4.2. Permissions
          1. 21.4.2.1. Permission Sets
          2. 21.4.2.2. Demanding Permissions Programmatically
          3. 21.4.2.3. Using the Sandbox API to Host Unprivileged Code
          4. 21.4.2.4. Implicit Permissions
      5. 21.5. DISTRIBUTING CODE USING CERTIFICATES
      6. 21.6. SUMMARY
    5. 22. Localization
      1. 22.1. NAMESPACE SYSTEM.GLOBALIZATION
        1. 22.1.1. Unicode Issues
        2. 22.1.2. Cultures and Regions
          1. 22.1.2.1. Specific, Neutral, and Invariant Cultures
          2. 22.1.2.2. CurrentCulture and CurrentUICulture
          3. 22.1.2.3. Number Formatting
          4. 22.1.2.4. Date Formatting
        3. 22.1.3. Cultures in Action
        4. 22.1.4. Sorting
      2. 22.2. RESOURCES
        1. 22.2.1. Creating Resource Files
        2. 22.2.2. Resource File Generator
        3. 22.2.3. ResourceWriter
        4. 22.2.4. Using Resource Files
        5. 22.2.5. The System.Resources Namespace
      3. 22.3. WINDOWS FORMS LOCALIZATION USING VISUAL STUDIO
        1. 22.3.1. Changing the Culture Programmatically
        2. 22.3.2. Using Custom Resource Messages
        3. 22.3.3. Automatic Fallback for Resources
        4. 22.3.4. Outsourcing Translations
      4. 22.4. LOCALIZATION WITH ASP.NET
      5. 22.5. LOCALIZATION WITH WPF
        1. 22.5.1. .NET Resources with WPF
        2. 22.5.2. XAML Resource Dictionaries
          1. 22.5.2.1. Create Satellite Assemblies
          2. 22.5.2.2. Add a Resource Dictionary
          3. 22.5.2.3. Uid Attributes for Localization
          4. 22.5.2.4. LocBaml Tool for Localization
      6. 22.6. A CUSTOM RESOURCE READER
        1. 22.6.1. Creating a DatabaseResourceReader
        2. 22.6.2. Creating a DatabaseResourceSet
        3. 22.6.3. Creating a DatabaseResourceManager
        4. 22.6.4. Client Application for DatabaseResourceReader
      7. 22.7. CREATING CUSTOM CULTURES
      8. 22.8. SUMMARY
    6. 23. System.Transactions
      1. 23.1. OVERVIEW
        1. 23.1.1. Transaction Phases
        2. 23.1.2. ACID Properties
      2. 23.2. DATABASE AND ENTITY CLASSES
      3. 23.3. TRADITIONAL TRANSACTIONS
        1. 23.3.1. ADO.NET Transactions
        2. 23.3.2. System.EnterpriseServices
      4. 23.4. SYSTEM.TRANSACTIONS
        1. 23.4.1. Committable Transactions
        2. 23.4.2. Transaction Promotion
        3. 23.4.3. Dependent Transactions
        4. 23.4.4. Ambient Transactions
          1. 23.4.4.1. Nested Scopes with Ambient Transactions
          2. 23.4.4.2. Multithreading with Ambient Transactions
      5. 23.5. ISOLATION LEVEL
      6. 23.6. CUSTOM RESOURCE MANAGERS
        1. 23.6.1. Transactional Resources
      7. 23.7. TRANSACTIONS WITH WINDOWS 7 AND WINDOWS SERVER 2008
      8. 23.8. SUMMARY
    7. 24. Networking
      1. 24.1. THE WEBCLIENT CLASS
        1. 24.1.1. Downloading Files
        2. 24.1.2. Basic WebClient Example
        3. 24.1.3. Uploading Files
      2. 24.2. WEBREQUEST AND WEBRESPONSE CLASSES
        1. 24.2.1. Authentication
        2. 24.2.2. Working with Proxies
        3. 24.2.3. Asynchronous Page Requests
      3. 24.3. DISPLAYING OUTPUT AS AN HTML PAGE
        1. 24.3.1. Allowing Simple Web Browsing from Your Applications
        2. 24.3.2. Launching Internet Explorer Instances
        3. 24.3.3. Giving Your Application More IE-Type Features
        4. 24.3.4. Printing Using the WebBrowser Control
        5. 24.3.5. Displaying the Code of a Requested Page
        6. 24.3.6. The WebRequest and WebResponse Classes Hierarchy
      4. 24.4. UTILITY CLASSES
        1. 24.4.1. URIs
        2. 24.4.2. IP Addresses and DNS Names
          1. 24.4.2.1. .NET Classes for IP Addresses
            1. 24.4.2.1.1. IPAddress
            2. 24.4.2.1.2. IPHostEntry
            3. 24.4.2.1.3. Dns
            4. 24.4.2.1.4. The DnsLookup Example
      5. 24.5. LOWER-LEVEL PROTOCOLS
        1. 24.5.1. Using SmtpClient
        2. 24.5.2. Using the TCP Classes
        3. 24.5.3. The TcpSend and TcpReceive Examples
        4. 24.5.4. TCP Versus UDP
        5. 24.5.5. The UDP Class
        6. 24.5.6. The Socket Class
          1. 24.5.6.1. Building a Server Console Application
          2. 24.5.6.2. Building the Client Application
      6. 24.6. SUMMARY
    8. 25. Windows Services
      1. 25.1. WHAT IS A WINDOWS SERVICE?
      2. 25.2. WINDOWS SERVICES ARCHITECTURE
        1. 25.2.1. Service Program
          1. 25.2.1.1. Service Control Manager
          2. 25.2.1.2. Main Function, Service-Main, and Handlers
        2. 25.2.2. Service Control Program
        3. 25.2.3. Service Configuration Program
        4. 25.2.4. Classes for Windows Services
      3. 25.3. CREATING A WINDOWS SERVICE PROGRAM
        1. 25.3.1. Creating Core Functionality for the Service
        2. 25.3.2. QuoteClient Example
        3. 25.3.3. Windows Service Program
          1. 25.3.3.1. The ServiceBase Class
          2. 25.3.3.2. Main Function
          3. 25.3.3.3. Service Start
          4. 25.3.3.4. Handler Methods
        4. 25.3.4. Threading and Services
        5. 25.3.5. Service Installation
        6. 25.3.6. Installation Program
          1. 25.3.6.1. The Installer Class
          2. 25.3.6.2. Process Installer and Service Installer
          3. 25.3.6.3. The ServiceInstallerDialog Class
          4. 25.3.6.4. installutil
          5. 25.3.6.5. Client
      4. 25.4. MONITORING AND CONTROLLING WINDOWS SERVICES
        1. 25.4.1. MMC Snap-in
        2. 25.4.2. net.exe Utility
        3. 25.4.3. sc.exe Utility
        4. 25.4.4. Visual Studio Server Explorer
        5. 25.4.5. Writing a Custom Service Controller
          1. 25.4.5.1. Monitoring the Service
          2. 25.4.5.2. Controlling the Service
      5. 25.5. TROUBLESHOOTING AND EVENT LOGGING
      6. 25.6. SUMMARY
    9. 26. Interop
      1. 26.1. .NET AND COM
        1. 26.1.1. Metadata
        2. 26.1.2. Freeing Memory
        3. 26.1.3. Interfaces
          1. 26.1.3.1. Custom Interfaces
          2. 26.1.3.2. Dispatch Interfaces
          3. 26.1.3.3. Dual Interfaces
          4. 26.1.3.4. Casting and QueryInterface
        4. 26.1.4. Method Binding
        5. 26.1.5. Data Types
        6. 26.1.6. Registration
        7. 26.1.7. Threading
          1. 26.1.7.1. Single-Threaded Apartment
          2. 26.1.7.2. Multithreaded Apartment
        8. 26.1.8. Error Handling
        9. 26.1.9. Events
        10. 26.1.10. Marshaling
      2. 26.2. USING A COM COMPONENT FROM A .NET CLIENT
        1. 26.2.1. Creating a COM Component
        2. 26.2.2. Creating a Runtime Callable Wrapper
        3. 26.2.3. Using the RCW
        4. 26.2.4. Using the COM Server with Dynamic Language Extensions
        5. 26.2.5. Threading Issues
        6. 26.2.6. Adding Connection Points
      3. 26.3. USING A .NET COMPONENT FROM A COM CLIENT
        1. 26.3.1. COM Callable Wrapper
        2. 26.3.2. Creating a .NET Component
        3. 26.3.3. Creating a Type Library
        4. 26.3.4. COM Interop Attributes
        5. 26.3.5. COM Registration
        6. 26.3.6. Creating a COM Client Application
        7. 26.3.7. Adding Connection Points
        8. 26.3.8. Creating a Client with a Sink Object
      4. 26.4. PLATFORM INVOKE
      5. 26.5. SUMMARY
    10. 27. Core XAML
      1. 27.1. OVERVIEW
        1. 27.1.1. Elements Map to .NET Objects
        2. 27.1.2. Using Custom .NET Classes
        3. 27.1.3. Properties as Attributes
        4. 27.1.4. Properties as Elements
        5. 27.1.5. Essential .NET Types
        6. 27.1.6. Collections
        7. 27.1.7. Constructors
      2. 27.2. DEPENDENCY PROPERTIES
        1. 27.2.1. Creating a Dependency Property
        2. 27.2.2. Coerce Value Callback
        3. 27.2.3. Value Changed Callbacks and Events
      3. 27.3. BUBBLING AND TUNNELING EVENTS
      4. 27.4. ATTACHED PROPERTIES
      5. 27.5. MARKUP EXTENSIONS
        1. 27.5.1. Creating Custom Markup Extensions
        2. 27.5.2. XAML-Defined Markup Extensions
      6. 27.6. READING AND WRITING XAML
      7. 27.7. SUMMARY
    11. 28. Managed Extensibility Framework
      1. 28.1. MEF ARCHITECTURE
      2. 28.2. CONTRACTS
      3. 28.3. EXPORTS
        1. 28.3.1. Exporting Properties and Methods
        2. 28.3.2. Exporting Metadata
      4. 28.4. IMPORTS
        1. 28.4.1. Lazy Loading of Parts
      5. 28.5. CONTAINERS AND EXPORT PROVIDERS
      6. 28.6. CATALOGS
      7. 28.7. SUMMARY
    12. 29. Manipulating Files and the Registry
      1. 29.1. MANAGING THE FILE SYSTEM
        1. 29.1.1. .NET Classes That Represent Files and Folders
        2. 29.1.2. The Path Class
        3. 29.1.3. A FileProperties Sample
      2. 29.2. MOVING, COPYING, AND DELETING FILES
        1. 29.2.1. FilePropertiesAndMovement Sample
        2. 29.2.2. Looking at the Code for FilePropertiesAndMovement
      3. 29.3. READING AND WRITING TO FILES
        1. 29.3.1. Reading a File
        2. 29.3.2. Writing to a File
        3. 29.3.3. Streams
        4. 29.3.4. Buffered Streams
        5. 29.3.5. Reading and Writing to Binary Files Using FileStream
          1. 29.3.5.1. The FileStream Class
          2. 29.3.5.2. BinaryFileReader Sample
        6. 29.3.6. Reading and Writing to Text Files
          1. 29.3.6.1. The StreamReader Class
          2. 29.3.6.2. The StreamWriter Class
          3. 29.3.6.3. ReadWriteText Sample
      4. 29.4. MAPPED-MEMORY FILES
      5. 29.5. READING DRIVE INFORMATION
      6. 29.6. FILE SECURITY
        1. 29.6.1. Reading ACLs from a File
        2. 29.6.2. Reading ACLs from a Directory
        3. 29.6.3. Adding and Removing ACLs from a File
      7. 29.7. READING AND WRITING TO THE REGISTRY
        1. 29.7.1. The Registry
        2. 29.7.2. The .NET Registry Classes
      8. 29.8. READING AND WRITING TO ISOLATED STORAGE
      9. 29.9. SUMMARY
  10. IV. Data
    1. 30. Core ADO.NET
      1. 30.1. ADO.NET OVERVIEW
        1. 30.1.1. Namespaces
        2. 30.1.2. Shared Classes
        3. 30.1.3. Database-Specific Classes
      2. 30.2. USING DATABASE CONNECTIONS
        1. 30.2.1. Managing Connection Strings
        2. 30.2.2. Using Connections Efficiently
        3. 30.2.3. Option One: try ... catch ... finally
          1. 30.2.3.1. Option Two: The using Block Statement
        4. 30.2.4. Transactions
      3. 30.3. COMMANDS
        1. 30.3.1. Executing Commands
        2. 30.3.2. ExecuteNonQuery()
          1. 30.3.2.1. ExecuteReader()
          2. 30.3.2.2. ExecuteScalar()
          3. 30.3.2.3. ExecuteXmlReader() (SqlClient Provider Only)
        3. 30.3.3. Calling Stored Procedures
          1. 30.3.3.1. Calling a Stored Procedure That Returns Nothing
            1. 30.3.3.1.1. Record Update
            2. 30.3.3.1.2. Record Deletion
          2. 30.3.3.2. Calling a Stored Procedure That Returns Output Parameters
            1. 30.3.3.2.1. Record Insertion
      4. 30.4. FAST DATA ACCESS: THE DATA READER
      5. 30.5. MANAGING DATA AND RELATIONSHIPS: THE DATASET CLASS
        1. 30.5.1. Data Tables
          1. 30.5.1.1. Data Columns
          2. 30.5.1.2. Data Rows
          3. 30.5.1.3. Schema Generation
            1. 30.5.1.3.1. Runtime Schema Generation
            2. 30.5.1.3.2. Hand-Coded Schema
        2. 30.5.2. Data Relationships
        3. 30.5.3. Data Constraints
          1. 30.5.3.1. Setting a Primary Key
          2. 30.5.3.2. Setting a Foreign Key
          3. 30.5.3.3. Setting Update and Delete Constraints
      6. 30.6. XML SCHEMAS: GENERATING CODE WITH XSD
      7. 30.7. POPULATING A DATASET
        1. 30.7.1. Populating a DataSet Class with a Data Adapter
          1. 30.7.1.1. Using a Stored Procedure in a Data Adapter
        2. 30.7.2. Populating a DataSet from XML
      8. 30.8. PERSISTING DATASET CHANGES
        1. 30.8.1. Updating with Data Adapters
          1. 30.8.1.1. Inserting a New Row
          2. 30.8.1.2. Updating an Existing Row
          3. 30.8.1.3. Deleting a Row
        2. 30.8.2. Writing XML Output
      9. 30.9. WORKING WITH ADO.NET
        1. 30.9.1. Tiered Development
        2. 30.9.2. Key Generation with SQL Server
        3. 30.9.3. Naming Conventions
          1. 30.9.3.1. Conventions for Database Tables
          2. 30.9.3.2. Conventions for Database Columns
          3. 30.9.3.3. Conventions for Constraints
          4. 30.9.3.4. Stored Procedures
      10. 30.10. SUMMARY
    2. 31. ADO.NET Entity Framework
      1. 31.1. OVERVIEW OF THE ADO.NET ENTITY FRAMEWORK
      2. 31.2. ENTITY FRAMEWORK MAPPING
        1. 31.2.1. Logical Layer
        2. 31.2.2. Conceptual Layer
        3. 31.2.3. Mapping Layer
      3. 31.3. ENTITY CLIENT
        1. 31.3.1. Connection String
        2. 31.3.2. Entity SQL
      4. 31.4. ENTITIES
      5. 31.5. OBJECT CONTEXT
      6. 31.6. RELATIONSHIPS
        1. 31.6.1. Table per Hierarchy
        2. 31.6.2. Table per Type
        3. 31.6.3. Lazy, Delayed, and Eager Loading
      7. 31.7. OBJECT QUERY
      8. 31.8. UPDATES
        1. 31.8.1. Object Tracking
        2. 31.8.2. Change Information
        3. 31.8.3. Attaching and Detaching Entities
        4. 31.8.4. Storing Entity Changes
      9. 31.9. LINQ TO ENTITIES
      10. 31.10. SUMMARY
    3. 32. Data Services
      1. 32.1. OVERVIEW
      2. 32.2. CUSTOM HOSTING WITH CLR OBJECTS
        1. 32.2.1. CLR Objects
        2. 32.2.2. Data Model
        3. 32.2.3. Data Service
        4. 32.2.4. Hosting the Service
        5. 32.2.5. Additional Service Operations
      3. 32.3. HTTP CLIENT APPLICATION
      4. 32.4. QUERIES WITH URLS
      5. 32.5. USING WCF DATA SERVICES WITH THE ADO.NET ENTITY FRAMEWORK
        1. 32.5.1. ASP.NET Hosting and EDM
        2. 32.5.2. .NET Applications Using System.Data.Service.Client
          1. 32.5.2.1. Data Service Context
          2. 32.5.2.2. LINQ Query
          3. 32.5.2.3. Observable Collections
          4. 32.5.2.4. Object Tracking
          5. 32.5.2.5. Adding, Modifying, and Deleting Entities
          6. 32.5.2.6. Operation Batching
      6. 32.6. SUMMARY
    4. 33. Manipulating XML
      1. 33.1. XML STANDARDS SUPPORT IN .NET
      2. 33.2. INTRODUCING THE SYSTEM.XML NAMESPACE
      3. 33.3. USING SYSTEM.XML CLASSES
      4. 33.4. READING AND WRITING STREAMED XML
        1. 33.4.1. Using the XmlReader Class
          1. 33.4.1.1. Read Methods
          2. 33.4.1.2. Retrieving Attribute Data
        2. 33.4.2. Validating with XmlReader
        3. 33.4.3. Using the XmlWriter Class
      5. 33.5. USING THE DOM IN .NET
        1. 33.5.1. Using the XmlDocument Class
          1. 33.5.1.1. Inserting Nodes
      6. 33.6. USING XPATHNAVIGATORS
        1. 33.6.1. The System.Xml.XPath Namespace
          1. 33.6.1.1. XPathDocument
          2. 33.6.1.2. XPathNavigator
          3. 33.6.1.3. XPathNodeIterator
          4. 33.6.1.4. Using Classes from the XPath Namespace
        2. 33.6.2. The System.Xml.Xsl Namespace
          1. 33.6.2.1. Transforming XML
          2. 33.6.2.2. Using XsltArgumentList
          3. 33.6.2.3. Debugging XSLT
          4. 33.6.2.4. Debugging without the Application
          5. 33.6.2.5. Debugging with the Application
      7. 33.7. XML AND ADO.NET
        1. 33.7.1. Converting ADO.NET Data to XML
          1. 33.7.1.1. Converting Relational Data
        2. 33.7.2. Converting XML to ADO.NET Data
      8. 33.8. SERIALIZING OBJECTS IN XML
        1. 33.8.1. Serialization without Source Code Access
      9. 33.9. LINQ TO XML AND .NET
      10. 33.10. WORKING WITH DIFFERENT XML OBJECTS
        1. 33.10.1. XDocument
        2. 33.10.2. XElement
        3. 33.10.3. XNamespace
        4. 33.10.4. XComment
        5. 33.10.5. XAttribute
      11. 33.11. USING LINQ TO QUERY XML DOCUMENTS
        1. 33.11.1. Querying Static XML Documents
        2. 33.11.2. Querying Dynamic XML Documents
      12. 33.12. MORE QUERY TECHNIQUES FOR XML DOCUMENTS
        1. 33.12.1. Reading from an XML Document
        2. 33.12.2. Writing to an XML Document
      13. 33.13. SUMMARY
    5. 34. .NET Programming with SQL Server
      1. 34.1. .NET RUNTIME HOST
      2. 34.2. MICROSOFT.SQLSERVER.SERVER
      3. 34.3. USER-DEFINED TYPES
        1. 34.3.1. Creating UDTs
        2. 34.4. Using UDTs with SQL Server
        3. 34.4.1. Using UDTs from Client-Side Code
      4. 34.5. USER-DEFINED AGGREGATES
        1. 34.5.1. Creating User-Defined Aggregates
        2. 34.5.2. Using User-Defined Aggregates
      5. 34.6. STORED PROCEDURES
        1. 34.6.1. Creating Stored Procedures
        2. 34.6.2. Using Stored Procedures
      6. 34.7. USER-DEFINED FUNCTIONS
        1. 34.7.1. Creating User-Defined Functions
        2. 34.7.2. Using User-Defined Functions
      7. 34.8. TRIGGERS
        1. 34.8.1. Creating Triggers Example
        2. 34.8.2. Using Triggers
      8. 34.9. XML DATA TYPE
        1. 34.9.1. Tables with XML Data
        2. 34.9.2. Reading XML Values
        3. 34.9.3. Querying the Data
        4. 34.9.4. XML Data Modification Language (XML DML)
        5. 34.9.5. XML Indexes
        6. 34.9.6. Strongly Typed XML
      9. 34.10. SUMMARY
  11. V. Presentation
    1. 35. Core WPF
      1. 35.1. OVERVIEW
        1. 35.1.1. Namespaces
        2. 35.1.2. Class Hierarchy
      2. 35.2. SHAPES
      3. 35.3. GEOMETRY
      4. 35.4. TRANSFORMATION
      5. 35.5. BRUSHES
        1. 35.5.1. SolidColorBrush
        2. 35.5.2. LinearGradientBrush
        3. 35.5.3. RadialGradientBrush
        4. 35.5.4. DrawingBrush
        5. 35.5.5. ImageBrush
        6. 35.5.6. VisualBrush
      6. 35.6. CONTROLS
        1. 35.6.1. Simple Controls
        2. 35.6.2. Content Controls
        3. 35.6.3. Headered Content Controls
        4. 35.6.4. Items Controls
        5. 35.6.5. Headered Items Controls
        6. 35.6.6. Decoration
      7. 35.7. LAYOUT
        1. 35.7.1. StackPanel
        2. 35.7.2. WrapPanel
        3. 35.7.3. Canvas
        4. 35.7.4. DockPanel
        5. 35.7.5. Grid
      8. 35.8. STYLES AND RESOURCES
        1. 35.8.1. Styles
        2. 35.8.2. Resources
        3. 35.8.3. System Resources
        4. 35.8.4. Accessing Resources from Code
        5. 35.8.5. Dynamic Resources
        6. 35.8.6. Resource Dictionaries
      9. 35.9. TRIGGERS
        1. 35.9.1. Property Triggers
        2. 35.9.2. MultiTrigger
        3. 35.9.3. Data Triggers
      10. 35.10. TEMPLATES
        1. 35.10.1. Control Templates
        2. 35.10.2. Data Templates
        3. 35.10.3. Styling a ListBox
        4. 35.10.4. ItemTemplate
        5. 35.10.5. Control Templates for ListBox Elements
      11. 35.11. ANIMATIONS
        1. 35.11.1. Timeline
        2. 35.11.2. Non-Linear Animations
        3. 35.11.3. Event Triggers
        4. 35.11.4. Keyframe Animations
      12. 35.12. VISUAL STATE MANAGER
        1. 35.12.1. 3-D
        2. 35.12.2. Model
        3. 35.12.3. Cameras
        4. 35.12.4. Lights
        5. 35.12.5. Rotation
      13. 35.13. SUMMARY
    2. 36. Business Applications with WPF
      1. 36.1. DATA BINDING
        1. 36.1.1. BooksDemo Application
        2. 36.1.2. Binding with XAML
        3. 36.1.3. Simple Object Binding
        4. 36.1.4. Change Notification
        5. 36.1.5. Object Data Provider
        6. 36.1.6. List Binding
        7. 36.1.7. Master Details Binding
        8. 36.1.8. MultiBinding
        9. 36.1.9. Priority Binding
        10. 36.1.10. Value Conversion
        11. 36.1.11. Adding List Items Dynamically
        12. 36.1.12. Data Template Selector
        13. 36.1.13. Binding to XML
        14. 36.1.14. Binding Validation
          1. 36.1.14.1. Handling Exceptions
          2. 36.1.14.2. Data Error Information
          3. 36.1.14.3. Custom Validation Rules
      2. 36.2. COMMANDING
        1. 36.2.1. Defining Commands
        2. 36.2.2. Defining Command Sources
        3. 36.2.3. Command Bindings
      3. 36.3. TREEVIEW
      4. 36.4. DATAGRID
        1. 36.4.1. Custom Columns
        2. 36.4.2. Row Details
        3. 36.4.3. Grouping with the DataGrid
      5. 36.5. SUMMARY
    3. 37. Creating Documents with WPF
      1. 37.1. TEXT ELEMENTS
        1. 37.1.1. Fonts
        2. 37.1.2. TextEffect
        3. 37.1.3. Inline
        4. 37.1.4. Block
        5. 37.1.5. Lists
        6. 37.1.6. Tables
        7. 37.1.7. Anchor to Blocks
      2. 37.2. FLOW DOCUMENTS
      3. 37.3. FIXED DOCUMENTS
      4. 37.4. XPS DOCUMENTS
      5. 37.5. PRINTING
        1. 37.5.1. Printing with the PrintDialog
        2. 37.5.2. Printing Visuals
      6. 37.6. SUMMARY
    4. 38. Silverlight
      1. 38.1. COMPARING WPF AND SILVERLIGHT
      2. 38.2. CREATING A SILVERLIGHT PROJECT
      3. 38.3. NAVIGATION
      4. 38.4. NETWORKING
        1. 38.4.1. Creating an ADO.NET Entity Data Model
        2. 38.4.2. Creating a WCF Service for Silverlight Clients
        3. 38.4.3. Calling WCF Services
        4. 38.4.4. Using WCF Data Services
        5. 38.4.5. Using System.Net to Access the Service
      5. 38.5. BROWSER INTEGRATION
        1. 38.5.1. Calling out to JavaScript
        2. 38.5.2. JavaScript Calling Silverlight
      6. 38.6. SILVERLIGHT OUT-OF-BROWSER APPLICATIONS
      7. 38.7. SUMMARY
    5. 39. Windows Forms
      1. 39.1. CREATING A WINDOWS FORMS APPLICATION
        1. 39.1.1. Class Hierarchy
      2. 39.2. CONTROL CLASS
        1. 39.2.1. Size and Location
        2. 39.2.2. Appearance
        3. 39.2.3. User Interaction
        4. 39.2.4. Windows Functionality
        5. 39.2.5. Miscellaneous Functionality
      3. 39.3. STANDARD CONTROLS AND COMPONENTS
        1. 39.3.1. Button
        2. 39.3.2. CheckBox
        3. 39.3.3. RadioButton
        4. 39.3.4. ComboBox, ListBox, and CheckedListBox
        5. 39.3.5. The DataGridView Control
          1. 39.3.5.1. Displaying Tabular Data
          2. 39.3.5.2. Data Sources
          3. 39.3.5.3. Displaying Data from an Array
          4. 39.3.5.4. DataTable
          5. 39.3.5.5. Displaying Data from a DataView
            1. 39.3.5.5.1. Filtering Rows by Data
            2. 39.3.5.5.2. Filtering Rows on State
            3. 39.3.5.5.3. Sorting Rows
          6. 39.3.5.6. IListSource and IList Interfaces
          7. 39.3.5.7. Displaying Generic Collections
        6. 39.3.6. DateTimePicker
        7. 39.3.7. ErrorProvider
        8. 39.3.8. ImageList
        9. 39.3.9. Label
        10. 39.3.10. ListView
        11. 39.3.11. PictureBox
        12. 39.3.12. ProgressBar
        13. 39.3.13. TextBox, RichTextBox, and MaskedTextBox
        14. 39.3.14. Panel
        15. 39.3.15. FlowLayoutPanel and TableLayoutPanel
        16. 39.3.16. SplitContainer
        17. 39.3.17. TabControl and TabPages
        18. 39.3.18. ToolStrip
        19. 39.3.19. MenuStrip
        20. 39.3.20. ContextMenuStrip
        21. 39.3.21. ToolStripMenuItem
        22. 39.3.22. ToolStripManager
        23. 39.3.23. ToolStripContainer
      4. 39.4. FORMS
        1. 39.4.1. Form Class
          1. 39.4.1.1. Form Instantiation and Destruction
          2. 39.4.1.2. Appearance
        2. 39.4.2. Multiple Document Interface
        3. 39.4.3. Creating Your Own User Controls
      5. 39.5. SUMMARY
    6. 40. Core ASP.NET
      1. 40.1. ASP.NET INTRODUCTION
        1. 40.1.1. How ASP.NET Files are Processed
        2. 40.1.2. Web Sites and Web Applications
        3. 40.1.3. State Management in ASP.NET
      2. 40.2. ASP.NET WEB FORMS
        1. 40.2.1. The ASP.NET Code Model
        2. 40.2.2. ASP.NET Server Controls
          1. 40.2.2.1. Adding Web Server Controls
            1. 40.2.2.1.1. Adding Web Server Controls In Source View
            2. 40.2.2.1.2. Adding an Event Handler
            3. 40.2.2.1.3. Running the Project
            4. 40.2.2.1.4. Changes to the Source HTML when the Button is Clicked
          2. 40.2.2.2. The Control Palette
            1. 40.2.2.2.1. Standard Web Server Controls
            2. 40.2.2.2.2. Data Web Server Controls
            3. 40.2.2.2.3. Validation Web Server Controls
          3. 40.2.2.3. Server Control Event-Booking Example
      3. 40.3. ADO.NET AND DATA BINDING
        1. 40.3.1. Updating the Event-Booking Application
          1. 40.3.1.1. The Database
            1. 40.3.1.1.1. Attendees
            2. 40.3.1.1.2. Rooms
            3. 40.3.1.1.3. Events
          2. 40.3.1.2. Binding to the Database
          3. 40.3.1.3. Customizing the Calendar Control
          4. 40.3.1.4. Adding Events to the Database
        2. 40.3.2. More on Data Binding
          1. 40.3.2.1. Data Display with Templates
            1. 40.3.2.1.1. Using Templates
      4. 40.4. APPLICATION CONFIGURATION
      5. 40.5. SUMMARY
    7. 41. ASP.NET Features
      1. 41.1. USER AND CUSTOM CONTROLS
        1. 41.1.1. User Controls
          1. 41.1.1.1. A Simple User Control
            1. 41.1.1.1.1. Adding Content to the Control
            2. 41.1.1.1.2. Adding a Suit Property
            3. 41.1.1.1.3. Accessing the New Property
          2. 41.1.1.2. User Controls in PCSDemoSite
        2. 41.1.2. Custom Controls
          1. 41.1.2.1. Creating and Referencing Custom Controls
          2. 41.1.2.2. Custom Control Sample
      2. 41.2. MASTER PAGES
        1. 41.2.1. Accessing Master Page Content from Web Pages
        2. 41.2.2. Nested Master Pages
        3. 41.2.3. Master Pages in PCSDemoSite
      3. 41.3. SITE NAVIGATION
        1. 41.3.1. Adding a Site Map File
        2. 41.3.2. Navigating in PCSDemoSite
      4. 41.4. SECURITY
        1. 41.4.1. Adding Forms Authentication Using the Security Setup Wizard
        2. 41.4.2. Implementing a Login System
        3. 41.4.3. Login Web Server Controls
        4. 41.4.4. Securing Directories
        5. 41.4.5. Security in PCSDemoSite
      5. 41.5. THEMES
        1. 41.5.1. Applying Themes to Pages
        2. 41.5.2. Defining Themes
        3. 41.5.3. Themes in PCSDemoSite
      6. 41.6. WEB PARTS
        1. 41.6.1. Web Parts Application Components
        2. 41.6.2. Web Parts Example
          1. 41.6.2.1. Web Parts in Action
          2. 41.6.2.2. Web Part Host Page Code
          3. 41.6.2.3. Web Part Code
          4. 41.6.2.4. Connecting Controls
      7. 41.7. ASP.NET AJAX
      8. 41.8. WHAT IS AJAX?
        1. 41.8.1. What Is ASP.NET AJAX?
          1. 41.8.1.1. Core Functionality
            1. 41.8.1.1.1. AJAX Extensions
            2. 41.8.1.1.2. AJAX Library
          2. 41.8.1.2. ASP.NET AJAX Control Toolkit
        2. 41.8.2. ASP.NET AJAX Web Site Example
        3. 41.8.3. ASP.NET AJAX-Enabled Web Site Configuration
          1. 41.8.3.1. Additional Configuration for the AJAX Control Toolkit
        4. 41.8.4. Adding ASP.NET AJAX Functionality
          1. 41.8.4.1. The ScriptManager Control
            1. 41.8.4.1.1. Detect Partial-Page Postbacks
            2. 41.8.4.1.2. Client-Side JavaScript References
            3. 41.8.4.1.3. Web Service References
            4. 41.8.4.1.4. Client-Side Error Messages
          2. 41.8.4.2. Using UpdatePanel Controls
            1. 41.8.4.2.1. Multiple UpdatePanel Controls on a Single Web Page
            2. 41.8.4.2.2. Server-Side UpdatePanel Updates
            3. 41.8.4.2.3. UpdatePanel Triggers
          3. 41.8.4.3. Using UpdateProgress
          4. 41.8.4.4. Using Extender Controls
        5. 41.8.5. Using the AJAX Library
          1. 41.8.5.1. Adding JavaScript to a Web Page
          2. 41.8.5.2. Global Utility Functions
          3. 41.8.5.3. Using the AJAX Library JavaScript OOP Extensions
            1. 41.8.5.3.1. Defining Namespaces
            2. 41.8.5.3.2. Defining Classes
            3. 41.8.5.3.3. Inheritance
            4. 41.8.5.3.4. Using User-Defined Types
          4. 41.8.5.4. The PageRequestManager and Application Objects
          5. 41.8.5.5. JavaScript Debugging
          6. 41.8.5.6. Making Asynchronous Web Method Calls
          7. 41.8.5.7. ASP.NET Application Services
      9. 41.9. SUMMARY
    8. 42. ASP.NET Dynamic Data and MVC
      1. 42.1. ROUTING
        1. 42.1.1. Query String Parameters
        2. 42.1.2. Defining Routes
          1. 42.1.2.1. Route Authorization
          2. 42.1.2.2. Default Parameter Values
          3. 42.1.2.3. Parameter Constraints
          4. 42.1.2.4. Route Order and Data Tokens
        3. 42.1.3. Using Route Parameters
          1. 42.1.3.1. RouteData Values
          2. 42.1.3.2. Expression Builders
          3. 42.1.3.3. Data Query Parameters
      2. 42.2. DYNAMIC DATA
        1. 42.2.1. Creating Dynamic Data Web Sites
          1. 42.2.1.1. Choosing a Data Access Model
          2. 42.2.1.2. Adding a Data Source
          3. 42.2.1.3. Configuring Scaffolding
          4. 42.2.1.4. Exploring the Result
        2. 42.2.2. Customizing Dynamic Data Web Sites
          1. 42.2.2.1. Controlling Scaffolding
          2. 42.2.2.2. Customizing Templates
          3. 42.2.2.3. Configuring Routing
        3. 42.2.3. Further Development
      3. 42.3. MVC
        1. 42.3.1. What Is MVC?
        2. 42.3.2. What Is ASP.NET MVC?
        3. 42.3.3. A Simple ASP.NET MVC Application
          1. 42.3.3.1. Creating the Application
          2. 42.3.3.2. Inspecting the Application
          3. 42.3.3.3. Adding a Model
          4. 42.3.3.4. Adding a Controller
          5. 42.3.3.5. Adding an Index Operation
          6. 42.3.3.6. Adding a Products View
          7. 42.3.3.7. Testing View Products Functionality
        4. 42.3.4. Customizing ASP.NET MVC Applications
          1. 42.3.4.1. URL Operation Routing
          2. 42.3.4.2. Action Links
          3. 42.3.4.3. Viewing Items with Details()
          4. 42.3.4.4. Adding Items with Create()
          5. 42.3.4.5. Editing Items with Edit()
        5. 42.3.5. Further Development
      4. 42.4. SUMMARY
  12. VI. Communication
    1. 43. Windows Communication Foundation
      1. 43.1. WCF OVERVIEW
      2. 43.2. SOAP
      3. 43.3. WSDL
      4. 43.4. REST
      5. 43.5. JSON
      6. 43.6. SIMPLE SERVICE AND CLIENT
        1. 43.6.1. Service Contract
        2. 43.6.2. Service Implementation
        3. 43.6.3. WCF Service Host and WCF Test Client
        4. 43.6.4. Custom Service Host
        5. 43.6.5. WCF Client
        6. 43.6.6. Diagnostics
      7. 43.7. CONTRACTS
        1. 43.7.1. Data Contract
        2. 43.7.2. Versioning
        3. 43.7.3. Service Contract
        4. 43.7.4. Message Contract
      8. 43.8. SERVICE IMPLEMENTATION
        1. 43.8.1. Creating a Client Programmatically
        2. 43.8.2. Error Handling
      9. 43.9. BINDING
      10. 43.10. HOSTING
        1. 43.10.1. Custom Hosting
        2. 43.10.2. WAS Hosting
        3. 43.10.3. Preconfigured Host Classes
      11. 43.11. CLIENTS
      12. 43.12. DUPLEX COMMUNICATION
      13. 43.13. SUMMARY
    2. 44. Windows Workflow Foundation 4
      1. 44.1. HELLO WORLD
      2. 44.2. ACTIVITIES
        1. 44.2.1. If Activity
        2. 44.2.2. InvokeMethod Activity
        3. 44.2.3. Parallel Activity
        4. 44.2.4. Delay Activity
        5. 44.2.5. Pick Activity
      3. 44.3. CUSTOM ACTIVITIES
        1. 44.3.1. Activity Validation
        2. 44.3.2. Designers
        3. 44.3.3. Custom Composite Activities
      4. 44.4. WORKFLOWS
        1. 44.4.1. Arguments and Variables
        2. 44.4.2. WorkflowApplication
          1. 44.4.2.1. Bookmarks
          2. 44.4.2.2. Extensions
          3. 44.4.2.3. Putting It All Together
        3. 44.4.3. WorkflowServiceHost
          1. 44.4.3.1. Defining the WorkflowServiceHost
          2. 44.4.3.2. Ensuring That a Workflow Can Be Created
          3. 44.4.3.3. Awaiting Events with Pick
        4. 44.4.4. Hosting the Designer
      5. 44.5. SUMMARY
    3. 45. Peer-to-Peer Networking
      1. 45.1. PEER-TO-PEER NETWORKING OVERVIEW
        1. 45.1.1. Client-Server Architecture
        2. 45.1.2. P2P Architecture
        3. 45.1.3. P2P Architectural Challenges
        4. 45.1.4. P2P Terminology
        5. 45.1.5. P2P Solutions
      2. 45.2. MICROSOFT WINDOWS PEER-TO-PEER NETWORKING
        1. 45.2.1. Peer Name Resolution Protocol (PNRP)
        2. 45.2.2. PNRP IDs
          1. 45.2.2.1. PNRP Clouds
          2. 45.2.2.2. PNRP in Windows 7
        3. 45.2.3. People Near Me
      3. 45.3. BUILDING P2P APPLICATIONS
        1. 45.3.1. System.Net.PeerToPeer
          1. 45.3.1.1. Registering Peer Names
          2. 45.3.1.2. Resolving Peer Names
          3. 45.3.1.3. Code Access Security in System.Net.PeerToPeer
          4. 45.3.1.4. Sample Application
        2. 45.3.2. System.Net.PeerToPeer.Collaboration
          1. 45.3.2.1. Signing In and Signing Out
          2. 45.3.2.2. Discovering Peers
          3. 45.3.2.3. Managing Contacts and Detecting Peer Presence
          4. 45.3.2.4. Sample Application
      4. 45.4. SUMMARY
    4. 46. Message Queuing
      1. 46.1. OVERVIEW
        1. 46.1.1. When to Use Message Queuing
        2. 46.1.2. Message Queuing Features
      2. 46.2. MESSAGE QUEUING PRODUCTS
      3. 46.3. MESSAGE QUEUING ARCHITECTURE
        1. 46.3.1. Messages
        2. 46.3.2. Message Queue
      4. 46.4. MESSAGE QUEUING ADMINISTRATIVE TOOLS
        1. 46.4.1. Creating Message Queues
        2. 46.4.2. Message Queue Properties
      5. 46.5. PROGRAMMING MESSAGE QUEUING
        1. 46.5.1. Creating a Message Queue
        2. 46.5.2. Finding a Queue
        3. 46.5.3. Opening Known Queues
          1. 46.5.3.1. Pathname
          2. 46.5.3.2. Format Name
        4. 46.5.4. Sending a Message
          1. 46.5.4.1. Message Formatter
          2. 46.5.4.2. Sending Complex Messages
        5. 46.5.5. Receiving Messages
          1. 46.5.5.1. Enumerating Messages
          2. 46.5.5.2. Asynchronous Read
      6. 46.6. COURSE ORDER APPLICATION
        1. 46.6.1. Course Order Class Library
        2. 46.6.2. Course Order Message Sender
        3. 46.6.3. Sending Priority and Recoverable Messages
        4. 46.6.4. Course Order Message Receiver
      7. 46.7. RECEIVING RESULTS
        1. 46.7.1. Acknowledgment Queues
        2. 46.7.2. Response Queues
      8. 46.8. TRANSACTIONAL QUEUES
      9. 46.9. MESSAGE QUEUING WITH WCF
        1. 46.9.1. Entity Classes with a Data Contract
        2. 46.9.2. WCF Service Contract
        3. 46.9.3. WCF Message Receiver Application
        4. 46.9.4. WCF Message Sender Application
      10. 46.10. MESSAGE QUEUE INSTALLATION
      11. 46.11. SUMMARY
    5. 47. Syndication
      1. 47.1. OVERVIEW OF SYSTEM.SERVICEMODEL.SYNDICATION
      2. 47.2. READING SYNDICATION FEEDS SAMPLE
      3. 47.3. OFFERING SYNDICATION FEEDS SAMPLE
      4. 47.4. SUMMARY
    6. 48. Graphics with GDI+
      1. 48.1. UNDERSTANDING DRAWING PRINCIPLES
        1. 48.1.1. GDI and GDI+
          1. 48.1.1.1. GDI+ Namespaces
          2. 48.1.1.2. Device Contexts and the Graphics Object
        2. 48.1.2. Drawing Shapes
        3. 48.1.3. Painting Shapes Using OnPaint()
        4. 48.1.4. Using the Clipping Region
      2. 48.2. MEASURING COORDINATES AND AREAS
        1. 48.2.1. Point and PointF
        2. 48.2.2. Size and SizeF
        3. 48.2.3. Rectangle and RectangleF
        4. 48.2.4. Region
      3. 48.3. DRAWING SCROLLABLE WINDOWS
      4. 48.4. WORLD, PAGE, AND DEVICE COORDINATES
      5. 48.5. COLORS
        1. 48.5.1. Red-Green-Blue Values
        2. 48.5.2. The Named Colors
        3. 48.5.3. Graphics Display Modes and the Safety Palette
        4. 48.5.4. The Safety Palette
      6. 48.6. PENS AND BRUSHES
        1. 48.6.1. Brushes
        2. 48.6.2. Pens
      7. 48.7. DRAWING SHAPES AND LINES
      8. 48.8. DISPLAYING IMAGES
      9. 48.9. ISSUES WHEN MANIPULATING IMAGES
      10. 48.10. DRAWING TEXT
      11. 48.11. SIMPLE TEXT EXAMPLE
      12. 48.12. FONTS AND FONT FAMILIES
      13. 48.13. ENUMERATING FONT FAMILIES EXAMPLE
      14. 48.14. EDITING A TEXT DOCUMENT: THE CAPSEDITOR EXAMPLE
        1. 48.14.1. The Invalidate() Method
        2. 48.14.2. Calculating Item Sizes and Document Size
        3. 48.14.3. OnPaint()
        4. 48.14.4. Coordinate Transforms
        5. 48.14.5. Responding to User Input
      15. 48.15. PRINTING
        1. 48.15.1. Implementing Print and Print Preview
      16. 48.16. SUMMARY
    7. 49. Visual Studio Tools for Office
      1. 49.1. VSTO OVERVIEW
        1. 49.1.1. Project Types
          1. 49.1.1.1. Document-Level Customizations
          2. 49.1.1.2. Application-Level Add-Ins
          3. 49.1.1.3. SharePoint Workflow Templates
        2. 49.1.2. Project Features
      2. 49.2. VSTO PROJECT FUNDAMENTALS
        1. 49.2.1. Office Object Model
        2. 49.2.2. VSTO Namespaces
        3. 49.2.3. Host Items and Host Controls
          1. 49.2.3.1. Word
          2. 49.2.3.2. Excel
        4. 49.2.4. Basic VSTO Project Structure
          1. 49.2.4.1. Document-Level Customization Project Structure
          2. 49.2.4.2. Application-Level Add-In Project Structure
        5. 49.2.5. The Globals Class
        6. 49.2.6. Event Handling
      3. 49.3. BUILDING VSTO SOLUTIONS
        1. 49.3.1. Managing Application-Level Add-Ins
        2. 49.3.2. Interacting with Applications and Documents
        3. 49.3.3. UI Customization
          1. 49.3.3.1. Ribbon Menus
          2. 49.3.3.2. Action Panes and Custom Task Panes
      4. 49.4. EXAMPLE APPLICATION
      5. 49.5. SUMMARY
    8. 50. Managed Add-In Framework
      1. 50.1. MAF ARCHITECTURE
        1. 50.1.1. Pipeline
        2. 50.1.2. Discovery
        3. 50.1.3. Activation and Isolation
        4. 50.1.4. Contracts
        5. 50.1.5. Lifetime
        6. 50.1.6. Versioning
      2. 50.2. ADD-IN SAMPLE
        1. 50.2.1. Add-In Contract
        2. 50.2.2. Calculator Add-In View
        3. 50.2.3. Calculator Add-In Adapter
        4. 50.2.4. Calculator Add-In
        5. 50.2.5. Calculator Host View
        6. 50.2.6. Calculator Host Adapter
        7. 50.2.7. Calculator Host
        8. 50.2.8. Additional Add-Ins
      3. 50.3. SUMMARY
    9. 51. Enterprise Services
      1. 51.1. USING ENTERPRISE SERVICES
        1. 51.1.1. History
        2. 51.1.2. Where to Use Enterprise Services
        3. 51.1.3. Key Features
          1. 51.1.3.1. Contexts
          2. 51.1.3.2. Automatic Transactions
          3. 51.1.3.3. Distributed Transactions
          4. 51.1.3.4. Object Pooling
          5. 51.1.3.5. Role-Based Security
          6. 51.1.3.6. Queued Components
          7. 51.1.3.7. Loosely Coupled Events
      2. 51.2. CREATING A SIMPLE COM+ APPLICATION
        1. 51.2.1. The ServicedComponent Class
        2. 51.2.2. Assembly Attributes
        3. 51.2.3. Creating the Component
      3. 51.3. DEPLOYMENT
        1. 51.3.1. Automatic Deployment
        2. 51.3.2. Manual Deployment
        3. 51.3.3. Creating an Installer Package
      4. 51.4. COMPONENT SERVICES EXPLORER
      5. 51.5. CLIENT APPLICATION
      6. 51.6. TRANSACTIONS
        1. 51.6.1. Transaction Attributes
        2. 51.6.2. Transaction Results
      7. 51.7. SAMPLE APPLICATION
        1. 51.7.1. Entity Classes
        2. 51.7.2. The OrderControl Component
        3. 51.7.3. The OrderData Component
        4. 51.7.4. The OrderLineData Component
        5. 51.7.5. Client Application
      8. 51.8. INTEGRATING WCF AND ENTERPRISE SERVICES
        1. 51.8.1. WCF Service Façade
        2. 51.8.2. Client Application
      9. 51.9. SUMMARY
    10. 52. Directory Services
      1. 52.1. THE ARCHITECTURE OF ACTIVE DIRECTORY
        1. 52.1.1. Active Directory Features
        2. 52.1.2. Active Directory Concepts
          1. 52.1.2.1. Objects
          2. 52.1.2.2. Schema
          3. 52.1.2.3. Configuration
          4. 52.1.2.4. The Active Directory Domain
          5. 52.1.2.5. Domain Controller
          6. 52.1.2.6. Site
          7. 52.1.2.7. Domain Tree
          8. 52.1.2.8. Forest
        3. 52.1.3. Global Catalog
          1. 52.1.3.1. Replication
        4. 52.1.4. Characteristics of Active Directory Data
        5. 52.1.5. Specifying Schema
      2. 52.2. ADMINISTRATION TOOLS FOR ACTIVE DIRECTORY
        1. 52.2.1. Active Directory Users and Computers
        2. 52.2.2. ADSI Edit
      3. 52.3. PROGRAMMING ACTIVE DIRECTORY
        1. 52.3.1. Classes in System.DirectoryServices
        2. 52.3.2. Binding to Directory Services
          1. 52.3.2.1. Protocol
          2. 52.3.2.2. Server Name
          3. 52.3.2.3. Port Number
          4. 52.3.2.4. Distinguished Name
            1. 52.3.2.4.1. Relative Distinguished Name
            2. 52.3.2.4.2. Default Naming Context
            3. 52.3.2.4.3. Object Identifier
          5. 52.3.2.5. Username
            1. 52.3.2.5.1. Downlevel Logon
            2. 52.3.2.5.2. Distinguished Name
            3. 52.3.2.5.3. User Principal Name
          6. 52.3.2.6. Authentication
          7. 52.3.2.7. Binding with the DirectoryEntry Class
          8. 52.3.2.8. Getting Directory Entries
          9. 52.3.2.9. Object Collections
        3. 52.3.3. Cache
        4. 52.3.4. Creating New Objects
        5. 52.3.5. Updating Directory Entries
        6. 52.3.6. Accessing Native ADSI Objects
        7. 52.3.7. Searching in Active Directory
          1. 52.3.7.1. SearchRoot
          2. 52.3.7.2. Filter
          3. 52.3.7.3. PropertiesToLoad
          4. 52.3.7.4. SearchScope
          5. 52.3.7.5. Search Limits
      4. 52.4. SEARCHING FOR USER OBJECTS
        1. 52.4.1. User Interface
        2. 52.4.2. Get the Schema Naming Context
        3. 52.4.3. Get the Property Names of the User Class
        4. 52.4.4. Search for User Objects
      5. 52.5. ACCOUNT MANAGEMENT
        1. 52.5.1. Display User Information
        2. 52.5.2. Create a User
        3. 52.5.3. Reset a Password
        4. 52.5.4. Create a Group
        5. 52.5.5. Add a User to a Group
        6. 52.5.6. Finding Users
      6. 52.6. DSML
        1. 52.6.1. Classes in System.DirectoryServices.Protocols
        2. 52.6.2. Searching for Active Directory Objects with DSML
      7. 52.7. SUMMARY
    11. 53. C#, Visual Basic, C++/CLI, and F#
      1. 53.1. NAMESPACES
      2. 53.2. DEFINING TYPES
        1. 53.2.1. Reference Types
        2. 53.2.2. Value Types
        3. 53.2.3. Type Inference
        4. 53.2.4. Interfaces
        5. 53.2.5. Enumerations
      3. 53.3. METHODS
        1. 53.3.1. Method Parameters and Return Types
        2. 53.3.2. Parameter Modifiers
        3. 53.3.3. Constructors
        4. 53.3.4. Properties
        5. 53.3.5. Object Initializers
        6. 53.3.6. Extension Methods
      4. 53.4. STATIC MEMBERS
      5. 53.5. ARRAYS
      6. 53.6. CONTROL STATEMENTS
        1. 53.6.1. if Statement
        2. 53.6.2. Conditional Operator
        3. 53.6.3. switch Statement
      7. 53.7. LOOPS
        1. 53.7.1. for Statement
        2. 53.7.2. while and do ... while Statements
        3. 53.7.3. foreach Statement
      8. 53.8. EXCEPTION HANDLING
      9. 53.9. INHERITANCE
        1. 53.9.1. Access Modifiers
        2. 53.9.2. Keywords
      10. 53.10. RESOURCE MANAGEMENT
        1. 53.10.1. IDisposable Interface Implementation
        2. 53.10.2. using Statement
        3. 53.10.3. Override Finalize
      11. 53.11. DELEGATES
      12. 53.12. EVENTS
      13. 53.13. GENERICS
      14. 53.14. LINQ QUERIES
      15. 53.15. C++/CLI MIXING NATIVE AND MANAGED CODE
      16. 53.16. C# SPECIFICS
      17. 53.17. SUMMARY
    12. 54. .NET Remoting
      1. 54.1. WHY USE .NET REMOTING?
      2. 54.2. .NET REMOTING TERMS EXPLAINED
        1. 54.2.1. Client-Side Communication
        2. 54.2.2. Server-Side Communication
      3. 54.3. CONTEXTS
        1. 54.3.1. Activation
        2. 54.3.2. Attributes and Properties
        3. 54.3.3. Communication between Contexts
      4. 54.4. REMOTE OBJECTS, CLIENTS, AND SERVERS
        1. 54.4.1. Remote Objects
        2. 54.4.2. A Simple Server Application
        3. 54.4.3. A Simple Client Application
      5. 54.5. .NET REMOTING ARCHITECTURE
        1. 54.5.1. Channels
          1. 54.5.1.1. Setting Channel Properties
          2. 54.5.1.2. Pluggability of a Channel
        2. 54.5.2. Formatters
        3. 54.5.3. ChannelServices and RemotingConfiguration
          1. 54.5.3.1. Server for Well-Known Objects
          2. 54.5.3.2. Server for Client-Activated Objects
        4. 54.5.4. Object Activation
          1. 54.5.4.1. Application URL
          2. 54.5.4.2. Activating Well-Known Objects
          3. 54.5.4.3. Activating Client-Activated Objects
          4. 54.5.4.4. Proxy Objects
          5. 54.5.4.5. Pluggability of a Proxy
          6. 54.5.4.6. Messages
        5. 54.5.5. Message Sinks
          1. 54.5.5.1. Envoy Sink
          2. 54.5.5.2. Server Context Sink
          3. 54.5.5.3. Object Sink
        6. 54.5.6. Passing Objects in Remote Methods
          1. 54.5.6.1. Security and Serialized Objects
          2. 54.5.6.2. Directional Attributes
        7. 54.5.7. Lifetime Management
          1. 54.5.7.1. Lease Renewals
          2. 54.5.7.2. Leasing Configuration Values
          3. 54.5.7.3. Classes Used for Lifetime Management
          4. 54.5.7.4. Getting Lease Information Example
          5. 54.5.7.5. Changing Default Lease Configurations
      6. 54.6. CONFIGURATION FILES
        1. 54.6.1. Server Configuration for Well-Known Objects
        2. 54.6.2. Client Configuration for Well-Known Objects
        3. 54.6.3. Server Configuration for Client-Activated Objects
        4. 54.6.4. Client Configuration for Client-Activated Objects
          1. 54.6.4.1. Server Code Using Configuration Files
        5. 54.6.5. Client Code Using Configuration Files
        6. 54.6.6. Delayed Loading of Client Channels
        7. 54.6.7. Debugging Configuration
        8. 54.6.8. Lifetime Services in Configuration Files
        9. 54.6.9. Formatter Providers
      7. 54.7. HOSTING SERVERS IN ASP.NET
      8. 54.8. CLASSES, INTERFACES, AND SOAPSUDS
        1. 54.8.1. Interfaces
        2. 54.8.2. Soapsuds
      9. 54.9. ASYNCHRONOUS REMOTING
        1. 54.9.1. Using Delegates with .NET Remoting
        2. 54.9.2. OneWay Attribute
      10. 54.10. SECURITY WITH .NET REMOTING
      11. 54.11. REMOTING AND EVENTS
        1. 54.11.1. Remote Object
        2. 54.11.2. Event Arguments
        3. 54.11.3. Server
        4. 54.11.4. Server Configuration File
        5. 54.11.5. Event Sink
        6. 54.11.6. Client
        7. 54.11.7. Client Configuration File
        8. 54.11.8. Running Programs
      12. 54.12. CALL CONTEXTS
      13. 54.13. SUMMARY
    13. 55. Web Services with ASP.NET
      1. 55.1. SOAP
        1. 55.1.1. WSDL
      2. 55.2. WEB SERVICES
        1. 55.2.1. Exposing Web Services
          1. 55.2.1.1. Types Available for Web Services
        2. 55.2.2. Consuming Web Services
      3. 55.3. EXTENDING THE EVENT-BOOKING EXAMPLE
        1. 55.3.1. The Event-Booking Web Service
        2. 55.3.2. The Event-Booking Client
      4. 55.4. EXCHANGING DATA USING SOAP HEADERS
      5. 55.5. SUMMARY
    14. 56. LINQ to SQL
      1. 56.1. LINQ TO SQL USING VISUAL STUDIO 2010
        1. 56.1.1. Calling the Products Table
        2. 56.1.2. Adding a LINQ to SQL Class
        3. 56.1.3. Introducing the O/R Designer
        4. 56.1.4. Creating the Product Object
      2. 56.2. HOW OBJECTS MAP TO LINQ OBJECTS
        1. 56.2.1. The DataContext Object
          1. 56.2.1.1. Using the ExecuteQuery Method
          2. 56.2.1.2. Using the Connection Property
          3. 56.2.1.3. Using an ADO.NET Transaction
          4. 56.2.1.4. Other Methods and Properties of the DataContext Object
        2. 56.2.2. The Table<TEntity> Object
      3. 56.3. WORKING WITHOUT THE O/R DESIGNER
        1. 56.3.1. Creating Your Own Custom Object
        2. 56.3.2. Querying with Your Custom Object and LINQ
        3. 56.3.3. Limiting the Columns Called with the Query
        4. 56.3.4. Working with Column Names
        5. 56.3.5. Creating Your Own DataContext Object
      4. 56.4. CUSTOM OBJECTS AND THE O/R DESIGNER
      5. 56.5. QUERYING THE DATABASE
        1. 56.5.1. Using Query Expressions
        2. 56.5.2. Query Expressions in Detail
        3. 56.5.3. Filtering Using Expressions
        4. 56.5.4. Performing Joins
        5. 56.5.5. Grouping Items
      6. 56.6. STORED PROCEDURES
      7. 56.7. SUMMARY
    15. 57. Windows Workflow Foundation 3.0
      1. 57.1. HELLO WORLD
      2. 57.2. ACTIVITIES
        1. 57.2.1. IfElseActivity
        2. 57.2.2. ParallelActivity
        3. 57.2.3. CallExternalMethodActivity
        4. 57.2.4. DelayActivity
        5. 57.2.5. ListenActivity
        6. 57.2.6. Activity Execution Model
      3. 57.3. CUSTOM ACTIVITIES
        1. 57.3.1. Activity Validation
        2. 57.3.2. Themes and Designers
        3. 57.3.3. ActivityToolboxItem and Icons
        4. 57.3.4. Custom Composite Activities
          1. 57.3.4.1. Adding a Designer
          2. 57.3.4.2. Attached Properties
      4. 57.4. WORKFLOWS
        1. 57.4.1. Sequential Workflows
        2. 57.4.2. State Machine Workflows
        3. 57.4.3. Passing Parameters to a Workflow
        4. 57.4.4. Returning Results from a Workflow
        5. 57.4.5. Binding Parameters to Activities
      5. 57.5. THE WORKFLOW RUNTIME
      6. 57.6. WORKFLOW SERVICES
        1. 57.6.1. The Persistence Service
        2. 57.6.2. The Tracking Service
        3. 57.6.3. Custom Services
      7. 57.7. INTEGRATION WITH WINDOWS COMMUNICATION FOUNDATION
      8. 57.8. HOSTING WORKFLOWS
      9. 57.9. THE WORKFLOW DESIGNER
      10. 57.10. MOVING FROM WF 3.X TO WF 4
        1. 57.10.1. Extract Activity Code into Services
        2. 57.10.2. Remove Code Activities
        3. 57.10.3. Run 3.x and 4 Side by Side
        4. 57.10.4. Consider Moving State Machines to Flowcharts
      11. 57.11. SUMMARY
    16. A. Guidelines for Windows 7 and Windows Server 2008 R2
      1. A.1. OVERVIEW
      2. A.2. APPLICATION RECOVERY
      3. A.3. USER ACCOUNT CONTROL
        1. A.3.1. Applications Requiring Admin Privileges
        2. A.3.2. Shield Icon
      4. A.4. DIRECTORY STRUCTURE
      5. A.5. NEW CONTROLS AND DIALOGS
        1. A.5.1. Command Link
        2. A.5.2. Task Dialog
        3. A.5.3. Taskbar and Jump List
      6. A.6. SUMMARY

Product information

  • Title: Professional C# 4 and .NET 4
  • Author(s):
  • Release date: March 2010
  • Publisher(s): Wrox
  • ISBN: 9780470502259