Professional Visual Basic® 2010 and .NET 4

Book description

Intermediate and advanced coverage of Visual Basic 2010 and .NET 4 for professional developers

If you've already covered the basics and want to dive deep into VB and .NET topics that professional programmers use most, this is your book. You'll find a quick review of introductory topics-always helpful-before the author team of experts moves you quickly into such topics as data access with ADO.NET, Language Integrated Query (LINQ), security, ASP.NET web programming with Visual Basic, Windows workflow, threading, and more.

You'll explore all the new features of Visual Basic 2010 as well as all the essential functions that you need, including .NET features such as LINQ to SQL, LINQ to XML, WCF, and more. Plus, you'll examine exception handling and debugging, Visual Studio features, and ASP.NET web programming.

  • Expert author team helps you master the tools and techniques you need most for professional programming

  • Reviews why Visual Basic 2010 will be synonymous with writing code in Visual Studio 2010

  • Focuses on .NET features such as LINQ, LINQ to SQL, LINQ to XML, WPF, workflow, and more

  • Discusses exception handling and debugging, data access with ADO.NET, Visual Studio features for Visual Basic developers, Windows programming with Windows Forms, ASP.NET web programming with VB, communication interfaces, Windows workflow, and threading

This Wrox guide presents you with updated coverage on topics you need to know now.

Table of contents

  1. Copyright
  2. ABOUT THE AUTHORS
  3. ABOUT THE TECHNICAL EDITORS
  4. CREDITS
  5. ACKNOWLEDGMENTS
  6. INTRODUCTION
    1. THE FUTURE OF VISUAL BASIC
    2. WHO THIS BOOK IS FOR
    3. WHAT YOU NEED TO USE THIS BOOK
    4. WHAT THIS BOOK COVERS
    5. CONVENTIONS
    6. SOURCE CODE
    7. ERRATA
    8. P2P.WROX.COM
  7. I. Language Constructs and Environment
    1. 1. Visual Studio 2010
      1. 1.1. VISUAL STUDIO 2010: EXPRESS THROUGH ULTIMATE
      2. 1.2. VISUAL BASIC KEYWORDS AND SYNTAX
        1. 1.2.1. Console Applications
        2. 1.2.2. Creating a Project from a Project Template
        3. 1.2.3. The Solution Explorer
        4. 1.2.4. Project Properties
        5. 1.2.5. Assembly Information Screen
          1. 1.2.5.1. Assembly Attributes
        6. 1.2.6. Compiler Settings
        7. 1.2.7. Debug Properties
        8. 1.2.8. References
        9. 1.2.9. Resources
        10. 1.2.10. Settings
        11. 1.2.11. Other Project Property Tabs
          1. 1.2.11.1. Signing
          2. 1.2.11.2. My Extensions
          3. 1.2.11.3. Security
          4. 1.2.11.4. Publish
          5. 1.2.11.5. Code Analysis
      3. 1.3. PROJECT PROVB_VS2010
        1. 1.3.1. Form Properties Set in Code
          1. 1.3.1.1. Code Regions
          2. 1.3.1.2. Tear-Away Tabs
          3. 1.3.1.3. Running ProVB_VS2010
          4. 1.3.1.4. Customizing the Text Editor
          5. 1.3.1.5. IntelliSense, Code Expansion, and Code Snippets
            1. 1.3.1.5.1. IntelliSense
            2. 1.3.1.5.2. Code Expansion
            3. 1.3.1.5.3. Code Snippets
        2. 1.3.2. Additional Components for Visual Studio
      4. 1.4. ENHANCING A SAMPLE APPLICATION
        1. 1.4.1. Customizing the Code
          1. 1.4.1.1. Adding XML Comments
          2. 1.4.1.2. Customizing the Event Handler
          3. 1.4.1.3. Reviewing the Code
        2. 1.4.2. Building Applications
          1. 1.4.2.1. Running an Application in the Debugger
          2. 1.4.2.2. Other Debug-Related Windows
            1. 1.4.2.2.1. Output
            2. 1.4.2.2.2. Call Stack
            3. 1.4.2.2.3. Locals
            4. 1.4.2.2.4. Watch Windows
            5. 1.4.2.2.5. Immediate Window
            6. 1.4.2.2.6. Autos
        3. 1.4.3. Reusing Your First Windows Form
      5. 1.5. USEFUL FEATURES OF VISUAL STUDIO 2010
        1. 1.5.1. Build Configurations
        2. 1.5.2. The Task List
        3. 1.5.3. The Command Window
        4. 1.5.4. Server Explorer
        5. 1.5.5. Recording and Using Macros in Visual Studio 2010
        6. 1.5.6. Class Diagrams
        7. 1.5.7. Application Lifecycle Management
          1. 1.5.7.1. Team Foundation Server (TFS)
          2. 1.5.7.2. Code Analysis
        8. 1.5.8. Performance Tools
      6. 1.6. SUMMARY
    2. 2. Objects and Visual Basic
      1. 2.1. OBJECT-ORIENTED TERMINOLOGY
        1. 2.1.1. Objects, Classes, and Instances
        2. 2.1.2. Composition of an Object
          1. 2.1.2.1. Interface
          2. 2.1.2.2. Implementation or Behavior
          3. 2.1.2.3. Fields or Instance Variables
        3. 2.1.3. System.Object
      2. 2.2. WORKING WITH VISUAL BASIC TYPES
        1. 2.2.1. Value and Reference Types
        2. 2.2.2. Primitive Types
      3. 2.3. COMMANDS: CONDITIONAL
        1. 2.3.1. If Then
        2. 2.3.2. Comparison Operators
        3. 2.3.3. Select Case
      4. 2.4. VALUE TYPES (STRUCTURES)
        1. 2.4.1. Boolean
        2. 2.4.2. Integer Types
          1. 2.4.2.1. Short
          2. 2.4.2.2. Integer
          3. 2.4.2.3. Long
        3. 2.4.3. Unsigned Types
        4. 2.4.4. Decimal Types
          1. 2.4.4.1. Single
          2. 2.4.4.2. Double
          3. 2.4.4.3. Decimal
        5. 2.4.5. Char and Byte
        6. 2.4.6. DateTime
      5. 2.5. REFERENCE TYPES (CLASSES)
        1. 2.5.1. The Object Class
        2. 2.5.2. The String Class
          1. 2.5.2.1. String()
          2. 2.5.2.2. The SubString Method
          3. 2.5.2.3. The PadLeft and PadRight Methods
          4. 2.5.2.4. The String.Split Method
          5. 2.5.2.5. The String Class Is Immutable
          6. 2.5.2.6. String Constants
        3. 2.5.3. XML Literals
        4. 2.5.4. The DBNull Class and IsDBNull Function
      6. 2.6. PARAMETER PASSING
        1. 2.6.1. ParamArray
      7. 2.7. VARIABLE SCOPE
      8. 2.8. WORKING WITH OBJECTS
        1. 2.8.1. Objects Declaration and Instantiation
        2. 2.8.2. Object References
        3. 2.8.3. Dereferencing Objects
        4. 2.8.4. Early Binding versus Late Binding
          1. 2.8.4.1. Implementing Late Binding
      9. 2.9. DATA TYPE CONVERSIONS
        1. 2.9.1. Performing Explicit Conversions
          1. 2.9.1.1. Parse and TryParse
          2. 2.9.1.2. Using the CType Function
          3. 2.9.1.3. Using DirectCast
          4. 2.9.1.4. Using TryCast
      10. 2.10. CREATING CLASSES
        1. 2.10.1. Basic Classes
          1. 2.10.1.1. The Class Keyword
          2. 2.10.1.2. Fields
          3. 2.10.1.3. Methods
          4. 2.10.1.4. Methods That Return Values
          5. 2.10.1.5. Indicating Method Scope
          6. 2.10.1.6. Method Parameters
          7. 2.10.1.7. Properties
          8. 2.10.1.8. Parameterized Properties
          9. 2.10.1.9. Read-Only Properties
          10. 2.10.1.10. Write-Only Properties
          11. 2.10.1.11. The Default Property
          12. 2.10.1.12. Events
        2. 2.10.2. Handling Events
        3. 2.10.3. Handling Multiple Events
        4. 2.10.4. The WithEvents Keyword
        5. 2.10.5. Raising Events
        6. 2.10.6. Declaring and Raising Custom Events
        7. 2.10.7. Receiving Events with WithEvents
        8. 2.10.8. Receiving Events with AddHandler
        9. 2.10.9. Constructor Methods
          1. 2.10.9.1. Parameterized Constructors
        10. 2.10.10. Termination and Cleanup
      11. 2.11. ADVANCED CONCEPTS
        1. 2.11.1. Overloading Methods
          1. 2.11.1.1. Method Signatures
          2. 2.11.1.2. Combining Overloading and Optional Parameters
        2. 2.11.2. Overloading Constructor Methods
          1. 2.11.2.1. Overloading the Constructor Method
        3. 2.11.3. Shared Methods, Variables, and Events
          1. 2.11.3.1. Shared Variables
          2. 2.11.3.2. Shared Methods
          3. 2.11.3.3. Shared Properties
          4. 2.11.3.4. Shared Events
          5. 2.11.3.5. Shared Constructor
        4. 2.11.4. Operator Overloading
          1. 2.11.4.1. Defining AndAlso and OrElse
        5. 2.11.5. Delegates
          1. 2.11.5.1. Declaring a Delegate
          2. 2.11.5.2. Using the Delegate Data Type
          3. 2.11.5.3. Implementing a Delegate Method
        6. 2.11.6. Classes versus Components
        7. 2.11.7. Lambdas
      12. 2.12. SUMMARY
    3. 3. Custom Objects
      1. 3.1. INHERITANCE
        1. 3.1.1. Implementing Inheritance
          1. 3.1.1.1. Creating a Base Class
          2. 3.1.1.2. Creating a Subclass
            1. 3.1.1.2.1. The Inherits Keyword
          3. 3.1.1.3. Overloading Methods
          4. 3.1.1.4. Overriding Methods
          5. 3.1.1.5. The Overridable Keyword
          6. 3.1.1.6. The Overrides Keyword
          7. 3.1.1.7. The MyBase Keyword
          8. 3.1.1.8. Virtual Methods
            1. 3.1.1.8.1. Overriding Overloaded Methods
          9. 3.1.1.9. Shadowing
            1. 3.1.1.9.1. Overriding Nonvirtual Methods
            2. 3.1.1.9.2. Shadowing Arbitrary Elements
          10. 3.1.1.10. Private Shadows Age As String
          11. 3.1.1.11. Levels of Inheritance
            1. 3.1.1.11.1. Multiple Inheritance
            2. 3.1.1.11.2. Multilevel Inheritance
        2. 3.1.2. Interacting with the Base Class, Your Class, and Your Object
          1. 3.1.2.1. The Me Keyword
          2. 3.1.2.2. The MyBase Keyword
          3. 3.1.2.3. The MyClass Keyword
          4. 3.1.2.4. Constructors
        3. 3.1.3. Simple Constructors
          1. 3.1.3.1. Constructors in More Depth
            1. 3.1.3.1.1. Constructors with Parameters
            2. 3.1.3.1.2. Constructors, Overloading, and Variable Initialization
            3. 3.1.3.1.3. More Constructors with Parameters
          2. 3.1.3.2. Protected Scope
            1. 3.1.3.2.1. Protected Variables
          3. 3.1.3.3. Events and Inheritance
          4. 3.1.3.4. Inheriting Events
          5. 3.1.3.5. Raising Events from Subclasses
          6. 3.1.3.6. Shared Methods
          7. 3.1.3.7. Overloading Shared Methods
          8. 3.1.3.8. Shadowing Shared Methods
          9. 3.1.3.9. Shared Events
        4. 3.1.4. Creating an Abstract Base Class
          1. 3.1.4.1. MustInherit Keyword
          2. 3.1.4.2. MustOverride Keyword
          3. 3.1.4.3. Public MustInherit Class Person
          4. 3.1.4.4. Abstract Base Classes
          5. 3.1.4.5. Preventing Inheritance
      2. 3.2. MULTIPLE INTERFACES
        1. 3.2.1. Object Interfaces
          1. 3.2.1.1. Using the Native Interface
        2. 3.2.2. Secondary Interfaces
          1. 3.2.2.1. Defining the Interface
          2. 3.2.2.2. Using the Interface
          3. 3.2.2.3. Implementing the Interface
          4. 3.2.2.4. Reusing a Common Implementation
          5. 3.2.2.5. Combining Interfaces and Inheritance
      3. 3.3. ABSTRACTION
      4. 3.4. ENCAPSULATION
      5. 3.5. POLYMORPHISM
        1. 3.5.1. Method Signatures
          1. 3.5.1.1. Implementing Polymorphism
          2. 3.5.1.2. Polymorphism through Late Binding
          3. 3.5.1.3. Polymorphism with Multiple Interfaces
          4. 3.5.1.4. Polymorphism through Reflection
          5. 3.5.1.5. Polymorphism via Reflection and Multiple Interfaces
          6. 3.5.1.6. Polymorphism with Inheritance
          7. 3.5.1.7. Polymorphism Summary
      6. 3.6. INHERITANCE
        1. 3.6.1. When to Use Inheritance
          1. 3.6.1.1. Application versus Framework Inheritance
          2. 3.6.1.2. Inheritance and Multiple Interfaces
          3. 3.6.1.3. Applying Inheritance and Multiple Interfaces
          4. 3.6.1.4. Creating the Contact Base Class
          5. 3.6.1.5. Subclassing Contact
          6. 3.6.1.6. Implementing IPrintableObject
        2. 3.6.2. How Deep to Go?
          1. 3.6.2.1. The Fragile-Base-Class Problem
          2. 3.6.2.2. Interface Changes
          3. 3.6.2.3. Implementation Changes
      7. 3.7. SUMMARY
    4. 4. The Common Language Runtime
      1. 4.1. ELEMENTS OF A .NET APPLICATION
        1. 4.1.1. Modules
        2. 4.1.2. Assemblies
        3. 4.1.3. Types
      2. 4.2. VERSIONING AND DEPLOYMENT
        1. 4.2.1. Better Support for Versioning
        2. 4.2.2. Major.Minor.Build.Revision
        3. 4.2.3. Better Deployment
      3. 4.3. CROSS-LANGUAGE INTEGRATION
        1. 4.3.1. The Common Type System
        2. 4.3.2. Metadata
        3. 4.3.3. Better Support for Metadata
        4. 4.3.4. Attributes
        5. 4.3.5. The Reflection API
      4. 4.4. IL DISASSEMBLER
      5. 4.5. MEMORY MANAGEMENT
        1. 4.5.1. Traditional Garbage Collection
          1. 4.5.1.1. Circular References
          2. 4.5.1.2. The CLR's Garbage Collector
          3. 4.5.1.3. The Finalize Method
          4. 4.5.1.4. The IDisposable Interface
          5. 4.5.1.5. Using IDisposable
        2. 4.5.2. Faster Memory Allocation for Objects
        3. 4.5.3. Garbage Collector Optimizations
      6. 4.6. NAMESPACES
        1. 4.6.1. What Is a Namespace?
        2. 4.6.2. Namespaces and References
        3. 4.6.3. Common Namespaces
        4. 4.6.4. Importing and Aliasing Namespaces
          1. 4.6.4.1. Importing Namespaces
        5. 4.6.5. Aliasing Namespaces
        6. 4.6.6. Referencing Namespaces in ASP.NET
      7. 4.7. CREATING YOUR OWN NAMESPACES
      8. 4.8. THE MY KEYWORD
        1. 4.8.1. My.Application
        2. 4.8.2. My.Computer
        3. 4.8.3. My.Forms Namespace
        4. 4.8.4. My.Resources
        5. 4.8.5. My.User
          1. 4.8.5.1. My.WebServices
      9. 4.9. EXTENDING THE MY NAMESPACE
      10. 4.10. SUMMARY
    5. 5. Declarative Programming with Visual Basic
      1. 5.1. DECLARATIVE PROGRAMMING AND VISUAL BASIC
      2. 5.2. USING XAML TO CREATE A WINDOW
      3. 5.3. XAML SYNTAX
        1. 5.3.1. XAML Language Basics
          1. 5.3.1.1.
            1. 5.3.1.1.1. Attributes
            2. 5.3.1.1.2. Markup Extensions
        2. 5.3.2. XAML Directives
      4. 5.4. USING XAML TO DECLARE A WORKFLOW
      5. 5.5. SUMMARY
    6. 6. Exception Handling and Debugging
      1. 6.1. NEW IN VISUAL STUDIO 2010 TEAM SYSTEM: HISTORICAL DEBUGGING
      2. 6.2. NOTES ON COMPATIBILITY WITH VB6
      3. 6.3. EXCEPTIONS IN .NET
        1. 6.3.1. Important Properties and Methods of an Exception
      4. 6.4. STRUCTURED EXCEPTION-HANDLING KEYWORDS
        1. 6.4.1. The Try, Catch, and Finally Keywords
        2. 6.4.2. The Throw Keyword
        3. 6.4.3. Throwing a New Exception
        4. 6.4.4. The Exit Try Statement
        5. 6.4.5. Nested Try Structures
        6. 6.4.6. Using Exception Properties
        7. 6.4.7. The Message Property
        8. 6.4.8. The InnerException and TargetSite Properties
          1. 6.4.8.1. Source and StackTrace
          2. 6.4.8.2. GetBaseException
          3. 6.4.8.3. HelpLink
      5. 6.5. INTEROPERABILITY WITH VB6-STYLE ERROR HANDLING
      6. 6.6. ERROR LOGGING
        1. 6.6.1. The Event Log
        2. 6.6.2. Events, Methods, and Properties
        3. 6.6.3. Writing to Trace Files
      7. 6.7. SUMMARY
    7. 7. Test-Driven Development
      1. 7.1. WHEN AND HOW TO TEST
        1. 7.1.1. Using Assertions
      2. 7.2. TDD TOOLS IN VISUAL STUDIO
      3. 7.3. UNITTESTING WALK-THROUGH
        1. 7.3.1. Creating a Test
        2. 7.3.2. Running a Test
        3. 7.3.3. Testing Data Access Code
          1. 7.3.3.1. Initialization/Cleanup
          2. 7.3.3.2. Test Implementation
        4. 7.3.4. Using the Generate from Usage Feature
      4. 7.4. OTHER VISUAL STUDIO EDITIONS
      5. 7.5. THIRD PARTY TESTING FRAMEWORKS
      6. 7.6. SUMMARY
  8. II. Business Objects and Data Access
    1. 8. Arrays, Collections, and Generics
      1. 8.1. ARRAYS
        1. 8.1.1. Multidimensional Arrays
        2. 8.1.2. The UBound Function
        3. 8.1.3. The ReDim Statement
        4. 8.1.4. The Preserve Keyword
      2. 8.2. COLLECTIONS
        1. 8.2.1.
          1. 8.2.1.1. Iterative Statements
            1. 8.2.1.1.1. For Each and For Next
            2. 8.2.1.1.2. While, Do While, and Do Until
          2. 8.2.1.2. Boxing
      3. 8.3. GENERICS
        1. 8.3.1. Using Generics
        2. 8.3.2. Nullable Types
        3. 8.3.3. Generic Types
          1. 8.3.3.1. Basic Usage
          2. 8.3.3.2. Inheritance
        4. 8.3.4. Generic Methods
      4. 8.4. CREATING GENERICS
        1. 8.4.1. Generic Types
          1. 8.4.1.1. Classes
          2. 8.4.1.2. Other Generic Class Features
          3. 8.4.1.3. Classes and Inheritance
          4. 8.4.1.4. Structures
          5. 8.4.1.5. Interfaces
        2. 8.4.2. Generic Methods
        3. 8.4.3. Constraints
          1. 8.4.3.1. Type Constraints
          2. 8.4.3.2. Class and Structure Constraints
          3. 8.4.3.3. New Constraints
          4. 8.4.3.4. Multiple Constraints
        4. 8.4.4. Generics amd Late Binding
        5. 8.4.5. Covariance and Contravariance
      5. 8.5. SUMMARY
    2. 9. Using XML with Visual Basic
      1. 9.1. AN INTRODUCTION TO XML
      2. 9.2. XML SERIALIZATION
        1. 9.2.1. Source Code Style Attributes
      3. 9.3. SYSTEM.XML DOCUMENT SUPPORT
      4. 9.4. XML STREAM-STYLE PARSERS
        1. 9.4.1. Writing an XML Stream
        2. 9.4.2. Reading an XML Stream
          1. 9.4.2.1. The XmlReaderSettings Class
          2. 9.4.2.2. Traversing XML Using XmlReader
          3. 9.4.2.3. Handling Exceptions
        3. 9.4.3. Document Object Model (DOM)
          1. 9.4.3.1. DOM Traversing XML
          2. 9.4.3.2. Writing XML with the DOM
      5. 9.5. XSL TRANSFORMATIONS
        1. 9.5.1. XSLT Transforming between XML Standards
        2. 9.5.2. Other Classes and Interfaces in System.Xml.Xsl
      6. 9.6. XML IN ASP.NET
        1. 9.6.1. The XmlDataSource Server Control
        2. 9.6.2. The XmlDataSource Control's Namespace Problem
        3. 9.6.3. The Xml Server Control
      7. 9.7. LINQ TO XML
      8. 9.8. LINQ HELPER XML OBJECTS
        1. 9.8.1. XDocument
        2. 9.8.2. XElement
        3. 9.8.3. XNamespace
        4. 9.8.4. XAttribute
      9. 9.9. VISUAL BASIC AND XML LITERALS
      10. 9.10. USING LINQ TO QUERY XML DOCUMENTS
        1. 9.10.1. Querying Static XML Documents
        2. 9.10.2. Querying Dynamic XML Documents
      11. 9.11. WORKING WITH THE XML DOCUMENT
        1. 9.11.1. Reading from an XML Document
        2. 9.11.2. Writing to an XML Document
      12. 9.12. LAMBDA EXPRESSIONS IN VISUAL BASIC
      13. 9.13. SUMMARY
    3. 10. ADO.NET and LINQ
      1. 10.1. ADO.NET ARCHITECTURE
      2. 10.2. BASIC ADO.NET FEATURES
        1. 10.2.1. Common ADO.NET Tasks
          1. 10.2.1.1. Selecting Data
          2. 10.2.1.2. Inserting Data
          3. 10.2.1.3. Updating Data
          4. 10.2.1.4. Deleting Data
        2. 10.2.2. Basic ADO.NET Namespaces and Classes
        3. 10.2.3. ADO.NET Components
      3. 10.3. .NET DATA PROVIDERS
        1. 10.3.1. Connection Object
          1. 10.3.1.1. Connection String Format — OleDbConnection
          2. 10.3.1.2. Connection-String Format — SqlConnection
        2. 10.3.2. Command Object
        3. 10.3.3. Using Stored Procedures with Command Objects
          1. 10.3.3.1. Creating a Stored Procedure
          2. 10.3.3.2. Calling the Stored Procedure
        4. 10.3.4. DataReader Object
        5. 10.3.5. Executing Commands Asynchronously
        6. 10.3.6. DataAdapter Objects
        7. 10.3.7. SQL Server .NET Data Provider
        8. 10.3.8. OLE DB .NET Data Provider
      4. 10.4. THE DATASET COMPONENT
        1. 10.4.1. DataTableCollection
        2. 10.4.2. DataRelationCollection
        3. 10.4.3. ExtendedProperties
        4. 10.4.4. Creating and Using DataSet Objects
          1. 10.4.4.1. Programmatically Creating DataSet Objects
        5. 10.4.5. ADO.NET DataTable Objects
        6. 10.4.6. Advanced ADO.NET Features of the DataSet and DataTable Objects
          1. 10.4.6.1. Indexing
          2. 10.4.6.2. Serialization
          3. 10.4.6.3. DataReader Integration
          4. 10.4.6.4. DataTable Independence
      5. 10.5. WORKING WITH THE COMMON PROVIDER MODEL
      6. 10.6. CONNECTION POOLING IN ADO.NET
      7. 10.7. TRANSACTIONS AND SYSTEM.TRANSACTIONS
        1. 10.7.1. Creating Transactions
        2. 10.7.2. Creating Resource Managers
      8. 10.8. LINQ TO SQL
      9. 10.9. LINQ TO SQL AND VISUAL BASIC
        1. 10.9.1. Retrieving Data Using LINQ to SQL: Creating the Console Application
        2. 10.9.2. Introducing the O/R Designer
        3. 10.9.3. Creating the Product Object
      10. 10.10. HOW OBJECTS MAP TO LINQ OBJECTS
        1. 10.10.1. The DataContext Object
          1. 10.10.1.1. Using the Connection Property
          2. 10.10.1.2. Using the Transaction Property
          3. 10.10.1.3. Other Methods and Properties of the DataContext Object
        2. 10.10.2. The Table(TEntity) Object
      11. 10.11. QUERYING THE DATABASE
        1. 10.11.1. Using Query Expressions
        2. 10.11.2. Query Expressions in Detail
        3. 10.11.3. Filtering Using Expressions
        4. 10.11.4. Performing Joins
        5. 10.11.5. Grouping Items
      12. 10.12. STORED PROCEDURES
      13. 10.13. UPDATING THE DATABASE
      14. 10.14. SUMMARY
    4. 11. Data Access with the Entity Framework
      1. 11.1. OBJECT-RELATIONAL MAPPING
      2. 11.2. ENTITY FRAMEWORK ARCHITECTURE
        1. 11.2.1. Conceptual Model
        2. 11.2.2. Storage Model
        3. 11.2.3. Mapping Model
        4. 11.2.4. LINQ to Entities
        5. 11.2.5. The ObjectContext
      3. 11.3. MAPPING OBJECTS TO ENTITIES
        1. 11.3.1. Simple Mapping
        2. 11.3.2. Using a Single Table for Multiple Objects
        3. 11.3.3. Using Multiple Tables for an Object
      4. 11.4. GENERATING THE DATABASE FROM A MODEL
        1. 11.4.1. Updating the Model
      5. 11.5. SUMMARY
    5. 12. Working with SQL Server
      1. 12.1. SQL SERVER COMPACT
        1. 12.1.1. Connecting to a SQL Server Compact Database
        2. 12.1.2. Synchronizing Data
      2. 12.2. SQL SERVER'S BUILT-IN XML FEATURES
      3. 12.3. CLR INTEGRATION IN SQL SERVER
        1. 12.3.1. Deciding between T-SQL and Visual Basic
        2. 12.3.2. Creating User-Defined Types
          1. 12.3.2.1. Creating Functions
          2. 12.3.2.2. Using the User-Defined Function
        3. 12.3.3. Creating Stored Procedures
          1. 12.3.3.1. Returning Data from the Stored Procedure
            1. 12.3.3.1.1. Returning a Single Value
            2. 12.3.3.1.2. Returning Multiple Values
        4. 12.3.4. Exposing Web Services from SQL Server
          1. 12.3.4.1. Accessing the Web Service
        5. 12.3.5. SQL Server 2008 Features
      4. 12.4. WCF DATA SERVICES
      5. 12.5. REST
        1. 12.5.1. Atom and JSON
        2. 12.5.2. Exposing Data Using WCF Data Services
        3. 12.5.3. WCF Data Services Client Library
      6. 12.6. SUMMARY
    6. 13. Services (XML/WCF)
      1. 13.1. INTRODUCTION TO SERVICES
        1. 13.1.1. The Network Angle
        2. 13.1.2. Application Development
        3. 13.1.3. Merging the Network and Application Development
        4. 13.1.4. The Foundations of Web Services
          1. 13.1.4.1. DCOM
          2. 13.1.4.2. Remote Method Invocation in Java
          3. 13.1.4.3. CORBA
        5. 13.1.5. The Problems
        6. 13.1.6. Some Other Players
        7. 13.1.7. Web Services
          1. 13.1.7.1. How This All Fits Together
        8. 13.1.8. What Makes a WCF Service
      2. 13.2. THE LARGER MOVE TO SOA
        1. 13.2.1. Capabilities of WCF
        2. 13.2.2. Contracts and Metadata
        3. 13.2.3. Working with the WS-* Protocols
      3. 13.3. BUILDING A WCF SERVICE
        1. 13.3.1. Creating the Interface
        2. 13.3.2. Utilizing the Interface
          1. 13.3.2.1. Hosting the WCF Service in a Console Application
        3. 13.3.3. Reviewing the WSDL Document
      4. 13.4. BUILDING A WCF CONSUMER
        1. 13.4.1. Adding a Service Reference
        2. 13.4.2. Reviewing the Reference
        3. 13.4.3. Configuration File Changes
        4. 13.4.4. Writing the Consumption Code
      5. 13.5. WORKING WITH DATA CONTRACTS
        1. 13.5.1. Building a Service with a Data Contract
      6. 13.6. NAMESPACES
        1. 13.6.1. Building the Host
        2. 13.6.2. Building the Consumer
        3. 13.6.3. Looking at WSDL and the Schema for HelloCustomerService
      7. 13.7. SUMMARY
  9. III. Smart Client Applications
    1. 14. Windows Forms
      1. 14.1. THE SYSTEM.WINDOWS.FORMS NAMESPACE
      2. 14.2. USING FORMS
        1. 14.2.1. Setting a Startup Form
        2. 14.2.2. Showing Forms via Sub Main
        3. 14.2.3. More about the Application Class
        4. 14.2.4. Startup Location for a Form
        5. 14.2.5. Form Borders
        6. 14.2.6. Always on Top — the TopMost Property
        7. 14.2.7. Owned Forms
          1. 14.2.7.1. AddOwnedForm Method
          2. 14.2.7.2. Owner Property
          3. 14.2.7.3. OwnedForms Collection
        8. 14.2.8. Making Forms Transparent and Translucent
          1. 14.2.8.1. The Opacity Property
          2. 14.2.8.2. The TransparencyKey Property
          3. 14.2.8.3. The Region Property
        9. 14.2.9. Visual Inheritance
        10. 14.2.10. Scrollable Forms
        11. 14.2.11. MDI Forms
          1. 14.2.11.1. Creating an MDI Parent Form
          2. 14.2.11.2. MDI Child Forms
        12. 14.2.12. An MDI Example in VB 2010
          1. 14.2.12.1. Arranging Child Windows
        13. 14.2.13. Dialog Forms
          1. 14.2.13.1. DialogResult
        14. 14.2.14. Forms at Runtime
        15. 14.2.15. Default Instances of Forms
      3. 14.3. CONTROLS
        1. 14.3.1. Control Tab Order
        2. 14.3.2. Properties for All Controls
          1. 14.3.2.1. MaximumSize and MinimumSize Properties
          2. 14.3.2.2. UseWaitCursor Property
        3. 14.3.3. Dynamic Sizing and Positioning of Controls
          1. 14.3.3.1. Docking
          2. 14.3.3.2. Anchoring
          3. 14.3.3.3. Sizable Containers
        4. 14.3.4. FlowLayoutPanel Control
          1. 14.3.4.1. Padding and Margin Properties
        5. 14.3.5. TableLayoutPanel Control
        6. 14.3.6. Panel and Groupbox Container Controls
        7. 14.3.7. Extender Providers
          1. 14.3.7.1. ToolTip
          2. 14.3.7.2. HelpProvider
          3. 14.3.7.3. ErrorProvider
          4. 14.3.7.4. Properties of Extender Providers
          5. 14.3.7.5. Working with Extender Providers in Code
        8. 14.3.8. Advanced Capabilities for Data Entry
          1. 14.3.8.1. Autocompletion
          2. 14.3.8.2. MaskedTextbox Control
        9. 14.3.9. Validating Data Entry
          1. 14.3.9.1. The Validating Event
          2. 14.3.9.2. The CausesValidation Property
        10. 14.3.10. Toolbars and the ToolStrip Control
          1. 14.3.10.1. Creating a ToolStrip and Adding Toolbar Elements
          2. 14.3.10.2. Allowing Users to Move Toolbar Elements
          3. 14.3.10.3. Creating a Standard Set of Toolbar Elements
        11. 14.3.11. Menus
          1. 14.3.11.1. Adding Standard Items to a Menu
          2. 14.3.11.2. Icons and Checkmarks for Menu Items
          3. 14.3.11.3. Context Menus
          4. 14.3.11.4. Dynamically Manipulating Menus at Runtime
        12. 14.3.12. Common Dialogs
          1. 14.3.12.1. OpenFileDialog and SaveFileDialog
          2. 14.3.12.2. ColorDialog Control
          3. 14.3.12.3. FontDialog Control
          4. 14.3.12.4. Printer Dialog Controls
        13. 14.3.13. Drag and Drop
        14. 14.3.14. Summary of Standard Windows.Forms Controls
        15. 14.3.15. Handling Groups of Related Controls
        16. 14.3.16. Adding Controls at Runtime
      4. 14.4. OTHER HANDY PROGRAMMING TIPS
      5. 14.5. SUMMARY
    2. 15. Advanced Windows Forms
      1. 15.1. PACKAGING LOGIC IN VISUAL CONTROLS
      2. 15.2. CUSTOM CONTROLS IN WINDOWS FORMS
        1. 15.2.1. Inheriting from an Existing Control
        2. 15.2.2. Building a Composite Control
        3. 15.2.3. Writing a Control from Scratch
      3. 15.3. INHERITING FROM AN EXISTING CONTROL
        1. 15.3.1. Process Overview
        2. 15.3.2. Writing Code for an Inherited Control
          1. 15.3.2.1. Creating a Property for a Custom Control
          2. 15.3.2.2. Coordinating with the Visual Studio IDE
            1. 15.3.2.2.1. Attributes
          3. 15.3.2.3. Setting a Default Value with an Attribute
          4. 15.3.2.4. Alternate Techniques for Working with the IDE
            1. 15.3.2.4.1. Providing a Reset Method for a Control Property
        3. 15.3.3. Other Useful Attributes
        4. 15.3.4. Defining a Custom Event for the Inherited Control
        5. 15.3.5. A CheckedListBox Limiting Selected Items
      4. 15.4. THE CONTROL AND USERCONTROL BASE CLASSES
        1. 15.4.1. The Control Class
        2. 15.4.2. The UserControl Class
      5. 15.5. A COMPOSITE USERCONTROL
        1. 15.5.1. Creating a Composite UserControl
        2. 15.5.2. Resizing the Control
        3. 15.5.3. Exposing Properties of Contained Controls
        4. 15.5.4. Stepping through the Example
      6. 15.6. BUILDING A CONTROL FROM SCRATCH
        1. 15.6.1. Painting a Custom Control with GDI+
          1. 15.6.1.1. What Is GDI+?
          2. 15.6.1.2. The System.Drawing Namespace
          3. 15.6.1.3. The System.Drawing.Graphics Class
          4. 15.6.1.4. Using GDI+ Capabilities in a Windows Form
      7. 15.7. ATTACHING AN ICON FOR THE TOOLBOX
      8. 15.8. EMBEDDING CONTROLS IN OTHER CONTROLS
      9. 15.9. SUMMARY
    3. 16. User Controls Combining WPF and Windows Forms
      1. 16.1. THE INTEGRATION LIBRARY
      2. 16.2. HOSTING WPF CONTROLS IN WINDOWS FORMS
        1. 16.2.1. Creating a WPF Control Library
        2. 16.2.2. The Windows Forms Application
          1. 16.2.2.1. Laying Out Controls on the Form
          2. 16.2.2.2. Adding Custom Code to the Form
          3. 16.2.2.3. Custom Display Masking
          4. 16.2.2.4. Using a Mapped Property of a WPF Control
      3. 16.3. HOSTING WINDOWS FORMS CONTROLS IN WPF
      4. 16.4. INTEGRATION LIMITATIONS
      5. 16.5. SUMMARY
    4. 17. WPF Desktop Applications
      1. 17.1. WHAT, WHERE, WHY, HOW — WPF STRATEGY
      2. 17.2. RASTER GRAPHICS AND VECTOR GRAPHICS
      3. 17.3. SHOULD YOUR NEXT WINDOWS PROJECT USE WPF?
      4. 17.4. CREATING A WPF APPLICATION
        1. 17.4.1. Implementing a Custom WPF Application
          1. 17.4.1.1. Controls
          2. 17.4.1.2. Event Handlers
          3. 17.4.1.3. Adding Behavior
          4. 17.4.1.4. Layout
        2. 17.4.2. Customizing the User Interface
          1. 17.4.2.1. Removing the Frame
          2. 17.4.2.2. Resources
        3. 17.4.3. Customizing the Buttons
          1. 17.4.3.1. WPF User Controls
          2. 17.4.3.2. Data Binding in WPF
          3. 17.4.3.3. Binding between WPF Controls
          4. 17.4.3.4. Dependency Properties
            1. 17.4.3.4.1. Creating a Custom Dependency Property
            2. 17.4.3.4.2. Modifying the Look of the User Interface
            3. 17.4.3.4.3. Styles
            4. 17.4.3.4.4. Data Binding to a Data Source
      5. 17.5. SUMMARY
    5. 18. Expression Blend 3
      1. 18.1. GETTING TO KNOW BLEND
        1. 18.1.1. Creating a New Project
          1. 18.1.1.1. Projects and Solutions Tab
          2. 18.1.1.2. Blend's Toolbox and the Assets Tab
          3. 18.1.1.3. Design Surface
          4. 18.1.1.4. Objects and Timeline
          5. 18.1.1.5. States
          6. 18.1.1.6. Properties
          7. 18.1.1.7. Resources
          8. 18.1.1.8. Data
      2. 18.2. SKETCHFLOW
        1. 18.2.1. Your First SketchFlow
          1. 18.2.1.1. SketchFlow Map
          2. 18.2.1.2. Adding Sketch Controls
          3. 18.2.1.3. Adding Simple Behaviors to Navigate
        2. 18.2.2. SketchFlow Player
          1. 18.2.2.1. User Feedback
        3. 18.2.3. Documenting Your SketchFlow
          1. 18.2.3.1. Annotations
          2. 18.2.3.2. Exporting to Word
      3. 18.3. SUMMARY
    6. 19. Silverlight
      1. 19.1. WHAT IS SILVERLIGHT?
        1. 19.1.1. Smooth Streaming
        2. 19.1.2. Industry Standard Video
        3. 19.1.3. Digital Rights Management
      2. 19.2. STARTING A SILVERLIGHT PROJECT
        1. 19.2.1. Silverlight Application
        2. 19.2.2. Silverlight Navigation Application
        3. 19.2.3. Silverlight Class Library
      3. 19.3. SILVERLIGHT SOLUTION
        1. 19.3.1. Web Application
          1. 19.3.1.1. The ClientBin Folder and .xap File
        2. 19.3.2. Aplication Library Caching
        3. 19.3.3. Silverlight Application
          1. 19.3.3.1. App.xaml
          2. 19.3.3.2. MainPage.xaml
      4. 19.4. CONTROLS
        1. 19.4.1. Layout Management
          1. 19.4.1.1. Grid
          2. 19.4.1.2. StackPanel
          3. 19.4.1.3. Canvas
          4. 19.4.1.4. ScrollViewer
          5. 19.4.1.5. Border
      5. 19.5. ADDING ITEMS TO THE SILVERLIGHT PROJECT
        1. 19.5.1. Silverlight User Control
        2. 19.5.2. Silverlight Application Class
        3. 19.5.3. Silverlight Page
        4. 19.5.4. Silverlight Child Window
        5. 19.5.5. Silverlight Template Control
        6. 19.5.6. Silverlight Resource Dictionary
      6. 19.6. SILVERLIGHT OUT OF THE BROWSER
      7. 19.7. SUMMARY
  10. IV. Internet Applications
    1. 20. Silverlight and Services
      1. 20.1. SERVICES AND SILVERLIGHT
        1. 20.1.1. ASMX Web Service
        2. 20.1.2. WCF Service
        3. 20.1.3. ADO.NET Data Service
      2. 20.2. MODEL-VIEW-VIEWMODEL
        1. 20.2.1. Separation of Concerns
        2. 20.2.2. The Model
        3. 20.2.3. The View
        4. 20.2.4. The ViewModel
      3. 20.3. SUMMARY
    2. 21. Working with ASP.NET
      1. 21.1. THE HISTORY OF ASP.NET
      2. 21.2. KEY FEATURES OF ASP.NET
        1. 21.2.1. Developer Productivity
        2. 21.2.2. Performance and Scalability
        3. 21.2.3. Localization
        4. 21.2.4. Health Monitoring
        5. 21.2.5. Easy Access to Data
        6. 21.2.6. Administration and Management
      3. 21.3. VISUAL STUDIO SUPPORT FOR ASP.NET
        1. 21.3.1. Web Site and Web Application Projects
        2. 21.3.2. ASP.NET Application Folders
          1. 21.3.2.1. \App_Code Folder (Web Site Projects Only)
          2. 21.3.2.2. \App_Data Folder
          3. 21.3.2.3. \App_Themes Folder
          4. 21.3.2.4. \App_GlobalResources Folder
          5. 21.3.2.5. \App_LocalResources
          6. 21.3.2.6. \App_WebReferences
          7. 21.3.2.7. \App_Browsers
        3. 21.3.3. Web Server Options
      4. 21.4. BUILDING ASP.NET APPLICATIONS USING WEB FORMS
        1. 21.4.1. Pages, Forms, Controls, and Events
          1. 21.4.1.1. Server Controls
          2. 21.4.1.2. Events
          3. 21.4.1.3. Page Life Cycle
          4. 21.4.1.4. ViewState
          5. 21.4.1.5. Field Validation
          6. 21.4.1.6. Compilation
          7. 21.4.1.7. Deployment
      5. 21.5. DATA-DRIVEN APPLICATIONS
        1. 21.5.1. Data Binding with the SqlDataSource Control
        2. 21.5.2. Data Binding with the LinqDataSource Control
        3. 21.5.3. Data Binding with the ObjectDataSource Control
      6. 21.6. SUMMARY
    3. 22. ASP.NET Advanced Features
      1. 22.1. MASTER PAGES
        1. 22.1.1. Creating a Master Page
        2. 22.1.2. Creating the Content Page
        3. 22.1.3. Providing Default Content in Your Master Page
      2. 22.2. NAVIGATION
        1. 22.2.1. Using the SiteMapPath Server Control
        2. 22.2.2. Menu Server Control
      3. 22.3. WORKING WITH THE ASP.NET PROVIDER MODEL
        1. 22.3.1. Creating an Application Services Database
          1. 22.3.1.1. The ASP.NET SQL Server Setup Wizard Command-Line Tool
          2. 22.3.1.2. The ASP.NET SQL Server Setup Wizard GUI Tool
          3. 22.3.1.3. Connecting the Built-In Providers to a Database
      4. 22.4. MEMBERSHIP AND ROLE MANAGEMENT
      5. 22.5. PROFILE PROPERTIES
      6. 22.6. MICROSOFT AJAX (ASP.NET AJAX)
        1. 22.6.1. Understanding the Need for Ajax
        2. 22.6.2. Microsoft Ajax Implementation
        3. 22.6.3. UpdatePanel Control vs. Client-Side Service Calls
          1. 22.6.3.1. Introducing the Sample Project
        4. 22.6.4. Adding the UpdatePanel Control
        5. 22.6.5. Using Client-Side Service Calls and Client Templates
      7. 22.7. SUMMARY
    4. 23. ASP.NET MVC
      1. 23.1. MODEL-VIEW-CONTROLLER AND ASP.NET
      2. 23.2. BUILDING AN ASP.NET MVC APPLICATION
        1. 23.2.1. Creating the Project
        2. 23.2.2. Controllers and Actions
        3. 23.2.3. Adding the Model
        4. 23.2.4. Views
        5. 23.2.5. Routing
        6. 23.2.6. Scaffolding and CRUD Operations
        7. 23.2.7. Validation
      3. 23.3. SUMMARY
    5. 24. SharePoint 2010 Development
      1. 24.1. INTRODUCTION
        1. 24.1.1. SharePoint Foundation 2010
        2. 24.1.2. SharePoint Server 2010
        3. 24.1.3. SharePoint Terminology
        4. 24.1.4. The SharePoint Development Environment
      2. 24.2. FEATURES AND THE SOLUTIONS FRAMEWORK
        1. 24.2.1. Features
          1. 24.2.1.1. Creating a Site Collection
          2. 24.2.1.2. Building a Feature
          3. 24.2.1.3. Creating the Element Maniftest
          4. 24.2.1.4. Manually Deploying and Installing the Feature
          5. 24.2.1.5. Activating the Feature
          6. 24.2.1.6. Deactivating and Removing the Feature
        2. 24.2.2. Solution Framework
          1. 24.2.2.1. Creating a Solution Package
          2. 24.2.2.2. Deploying a Farm Solution
          3. 24.2.2.3. Deploying a Sandboxed Solution
      3. 24.3. VISUAL STUDIO TOOLS FOR SHAREPOINT DEVELOPMENT
      4. 24.4. THE SHAREPOINT 2010 OBJECT MODELS
        1. 24.4.1. Server Object Model
        2. 24.4.2. Client Object Models
      5. 24.5. BUILDING WEB PARTS
      6. 24.6. SUMMARY
  11. V. Libraries and Specialized Topics
    1. 25. Visual Studio Tools for Office
      1. 25.1. EXAMINING THE VSTO RELEASES
        1. 25.1.1. Office Automation versus VSTO
        2. 25.1.2. PIA-Free Deployment
        3. 25.1.3. VSTO Project Types
      2. 25.2. OFFICE BUSINESS APPLICATION ARCHITECTURE
      3. 25.3. WORKING WITH BOTH VBA AND VSTO
      4. 25.4. CREATING A DOCUMENT TEMPLATE (WORD)
        1. 25.4.1. Adding Content to the Document
        2. 25.4.2. Adding a Ribbon and an Actions Pane
        3. 25.4.3. Activating the Actions Pane
        4. 25.4.4. Updating a Content Control
      5. 25.5. CREATING AN OFFICE ADD-IN (EXCEL)
      6. 25.6. OUTLOOK FORM REGIONS
      7. 25.7. SUMMARY
    2. 26. Windows Workflow Foundation
      1. 26.1. WORKFLOW IN APPLICATIONS
      2. 26.2. BUILDING WORKFLOWS
        1. 26.2.1. Adding Workflow with Windows Workflow Foundation
        2. 26.2.2. A Simple Workflow
        3. 26.2.3. Standard Activities
        4. 26.2.4. A Less Simple Workflow
        5. 26.2.5. Building Custom Activities
        6. 26.2.6. Dynamically Loading Workflows
      3. 26.3. REHOSTING THE WORKFLOW DESIGNER
      4. 26.4. SUMMARY
    3. 27. Localization
      1. 27.1. CULTURES AND REGIONS
        1. 27.1.1. Understanding Culture Types
        2. 27.1.2. Looking at Your Thread
        3. 27.1.3. Declaring Culture Globally in ASP.NET
        4. 27.1.4. Adopting Culture Settings in ASP.NET
      2. 27.2. TRANSLATING VALUES AND BEHAVIORS
        1. 27.2.1. Understanding Differences in Dates
        2. 27.2.2. Differences in Numbers and Currencies
        3. 27.2.3. Understanding Differences in Sorting
      3. 27.3. ASP.NET RESOURCE FILES
        1. 27.3.1. Making Use of Local Resources
          1. 27.3.1.1. Adding Another Language Resource File
          2. 27.3.1.2. Finalizing the Building of the Default.aspx Page
          3. 27.3.1.3. Neutral Cultures Are Generally Preferred
        2. 27.3.2. Global Resources
      4. 27.4. RESOURCE FILES IN WINDOWS FORMS
      5. 27.5. SUMMARY
    4. 28. COM-Interop
      1. 28.1. UNDERSTANDING COM
      2. 28.2. COM AND .NET IN PRACTICE
        1. 28.2.1. A Legacy Component
          1. 28.2.1.1. Implementing the Component
          2. 28.2.1.2. Step 2: Registering the Legacy Component
        2. 28.2.2. The .NET Application
          1. 28.2.2.1. Referencing the Legacy COM Component from .NET
          2. 28.2.2.2. Inside the .NET Application
        3. 28.2.3. Trying It All Out
        4. 28.2.4. Using TlbImp Directly
        5. 28.2.5. Late Binding
          1. 28.2.5.1. An Example for Late Binding
          2. 28.2.5.2. The Sample COM Object
          3. 28.2.5.3. The Calculation Framework
          4. 28.2.5.4. Running the Calculation Framework
      3. 28.3. ACTIVEX CONTROLS
        1. 28.3.1. The Legacy ActiveX Control
          1. 28.3.1.1. Step 1: Creating the Control
          2. 28.3.1.2. Step 2: Registering Your Legacy Control
        2. 28.3.2. A .NET Application, Again
        3. 28.3.3. Trying It All Out, Again
      4. 28.4. USING .NET COMPONENTS IN THE COM WORLD
        1. 28.4.1. A .NET Component
        2. 28.4.2. RegAsm
        3. 28.4.3. TlbExp
      5. 28.5. P/INVOKE
        1. 28.5.1. Windows API Code Pack
      6. 28.6. SUMMARY
    5. 29. Network Programming
      1. 29.1. PROTOCOLS, ADDRESSES, AND PORTS
        1. 29.1.1. Addresses and Names
        2. 29.1.2. Ports: They're Not Just for Ships
        3. 29.1.3. Firewalls: Can't Live with Them, Can't Live without Them
      2. 29.2. THE SYSTEM.NET NAMESPACE
        1. 29.2.1. Web Requests (and Responses)
          1. 29.2.1.1. WebRequest Child Classes
          2. 29.2.1.2. Putting It Together
        2. 29.2.2. Simplifying Common Web Requests with WebClient
      3. 29.3. SOCKETS
        1. 29.3.1. Building the Application
        2. 29.3.2. Creating Conversation Windows
          1. 29.3.2.1. Creating the Conversation Form
          2. 29.3.2.2. Initiating Connections
          3. 29.3.2.3. Receiving Inbound Connections
        3. 29.3.3. Sending Messages
          1. 29.3.3.1. The Message Class
        4. 29.3.4. Shutting Down the Application
      4. 29.4. USING INTERNET EXPLORER IN YOUR APPLICATIONS
        1. 29.4.1. Windows Forms and HTML — No Problem!
          1. 29.4.1.1. Allowing Simple Web Browsing in Your Windows Application
          2. 29.4.1.2. Launching Internet Explorer from Your Windows Application
          3. 29.4.1.3. Updating URLs and Page Titles
      5. 29.5. SUMMARY
    6. 30. Application Services
      1. 30.1. USING IIS FOR APPLICATION SERVICES
      2. 30.2. WINDOWS SERVICES
      3. 30.3. CHARACTERISTICS OF A WINDOWS SERVICE
      4. 30.4. INTERACTING WITH WINDOWS SERVICES
      5. 30.5. CREATING A WINDOWS SERVICE
        1. 30.5.1. The .NET Framework Classes for Windows Services
          1. 30.5.1.1. The ServiceBase Class
          2. 30.5.1.2. Installation-Oriented Classes
          3. 30.5.1.3. Multiple Services within One Executable
          4. 30.5.1.4. The ServiceController Class
        2. 30.5.2. Other Types of Windows Services
      6. 30.6. CREATING A WINDOWS SERVICE IN VISUAL BASIC
      7. 30.7. CREATING A FILE WATCHER SERVICE
        1. 30.7.1. Creating a Solution for the Windows Service
        2. 30.7.2. Adding .NET Components to the Service
          1. 30.7.2.1. The FileSystemWatcher Component
          2. 30.7.2.2. The EnableRaisingEvents Property
          3. 30.7.2.3. The Path Property
          4. 30.7.2.4. The NotifyFilter Property
          5. 30.7.2.5. The Filter Property
          6. 30.7.2.6. The IncludeSubdirectories Property
          7. 30.7.2.7. Adding FileSystemWatcher Code to OnStart and OnStop
          8. 30.7.2.8. The EventLog Component
          9. 30.7.2.9. The Created Event
        3. 30.7.3. Installing the Service
        4. 30.7.4. Starting the Service
        5. 30.7.5. Uninstalling the Service
      8. 30.8. COMMUNICATING WITH THE SERVICE
        1. 30.8.1. The ServiceController Class
        2. 30.8.2. Integrating a ServiceController into the Example
        3. 30.8.3. More about ServiceController
      9. 30.9. CUSTOM COMMANDS
      10. 30.10. PASSING STRINGS TO A SERVICE
      11. 30.11. DEBUGGING THE SERVICE
      12. 30.12. SUMMARY
    7. 31. Assemblies and Reflection
      1. 31.1. ASSEMBLIES
      2. 31.2. THE MANIFEST
        1. 31.2.1. Assembly Identity
          1. 31.2.1.1. The Version Number
          2. 31.2.1.2. Strong Names
          3. 31.2.1.3. Signing an Assembly with a Strong Name
          4. 31.2.1.4. The Culture
        2. 31.2.2. Referenced Assemblies
          1. 31.2.2.1. The .publickeytoken Directive
          2. 31.2.2.2. The .ver Directive
          3. 31.2.2.3. The .locale Directive
      3. 31.3. ASSEMBLIES AND DEPLOYMENT
        1. 31.3.1. Application-Private Assemblies
        2. 31.3.2. Shared Assemblies
          1. 31.3.2.1. The Global Assembly Cache
      4. 31.4. VERSIONING ISSUES
        1. 31.4.1. Application Isolation
        2. 31.4.2. Side-By-Side Execution
        3. 31.4.3. Self-Describing Components
        4. 31.4.4. Version Policies
          1. 31.4.4.1. The Default Versioning Policy
          2. 31.4.4.2. Automatic Quick Fix Engineering Policy
        5. 31.4.5. Configuration Files
          1. 31.4.5.1. Startup Settings
          2. 31.4.5.2. Runtime Settings
            1. 31.4.5.2.1. Loading a Particular Version of an Assembly
            2. 31.4.5.2.2. Defining the Location of an Assembly
            3. 31.4.5.2.3. Providing the Search Path
      5. 31.5. BASICS OF REFLECTION
        1. 31.5.1. The Assembly Class
        2. 31.5.2. Getting Currently Loaded Assemblies
        3. 31.5.3. The Type Class
          1. 31.5.3.1. Finding the Types in an Assembly
          2. 31.5.3.2. Finding the Members of a Type
      6. 31.6. DYNAMIC LOADING OF ASSEMBLIES
        1. 31.6.1. The LoadFrom Method of the Assembly Class
        2. 31.6.2. Dynamic Loading Example
        3. 31.6.3. Putting Assemblies to Work
      7. 31.7. SUMMARY
    8. 32. Security in the .NET Framework
      1. 32.1. SECURITY CONCEPTS AND DEFINITIONS
      2. 32.2. PERMISSIONS IN THE SYSTEM.SECURITY.PERMISSIONS NAMESPACE
        1. 32.2.1. Code Access Permissions
        2. 32.2.2. Identity Permissions
        3. 32.2.3. Role-Based Permissions
      3. 32.3. MANAGING CODE ACCESS PERMISSION SETS
      4. 32.4. USER ACCESS CONTROL
      5. 32.5. DEFINING YOUR APPLICATION UAC SETTINGS
        1. 32.5.1. Security Tools
        2. 32.5.2. Exceptions Using the SecurityException Class
      6. 32.6. ENCRYPTION BASICS
        1. 32.6.1. Hash Algorithms
          1. 32.6.1.1. Cryptographic Hash Algorithms
            1. 32.6.1.1.1. SHA
            2. 32.6.1.1.2. MD5
            3. 32.6.1.1.3. RIPEMD-160
          2. 32.6.1.2. Symmetric Key Encryption
            1. 32.6.1.2.1. PKCS
          3. 32.6.1.3. Digital Signature Example
          4. 32.6.1.4. X.509 Certificates
          5. 32.6.1.5. Secure Sockets Layer
      7. 32.7. SUMMARY
    9. 33. Parallel Programming Using Tasks and Threads
      1. 33.1. LAUNCHING PARALLEL TASKS
        1. 33.1.1. System.Threading.Tasks.Parallel Class
        2. 33.1.2. Parallel.Invoke
          1. 33.1.2.1. Lack of Execution Order
          2. 33.1.2.2. Advantages and Disadvantages
          3. 33.1.2.3. Parallelism and Concurrency
      2. 33.2. TRANSFORMING SEQUENTIAL CODE TO PARALLEL CODE
        1. 33.2.1. Detecting Hotspots
        2. 33.2.2. Measuring Speedups Achieved by Parallel Execution
        3. 33.2.3. Understanding Parallel and Concurrent Execution
      3. 33.3. PARALLELIZING LOOPS
        1. 33.3.1. Parallel.For
          1. 33.3.1.1. Refactoring an Existing Sequential Loop
          2. 33.3.1.2. Measuring Scalability
        2. 33.3.2. Parallel.ForEach
          1. 33.3.2.1. Working with Partitions in a Parallel Loop
          2. 33.3.2.2. Optimizing Partitions According to Number of Cores
          3. 33.3.2.3. Working with IEnumerable Sources of Data
        3. 33.3.3. Exiting from Parallel Loops
          1. 33.3.3.1. Understanding ParallelLoopState
          2. 33.3.3.2. Analyzing the Results of a Parallel Loop Execution
          3. 33.3.3.3. Catching Parallel Loop Exceptions
      4. 33.4. SPECIFYING THE DESIRED DEGREE OF PARALLELISM
        1. 33.4.1. ParallelOptions
        2. 33.4.2. Understanding Hardware Threads and Logical Cores
      5. 33.5. CREATING AND MANAGING TASKS
        1. 33.5.1. System.Threading.Tasks.Task
        2. 33.5.2. Understanding a Task's Life Cycle
        3. 33.5.3. Using Tasks to Parallelize Code
          1. 33.5.3.1. Starting Tasks
          2. 33.5.3.2. Visualizing Tasks Using Parallel Tasks and Parallel Stacks
          3. 33.5.3.3. Waiting for Tasks to Finish
          4. 33.5.3.4. Canceling Tasks Using Tokens
          5. 33.5.3.5. Handling Exceptions Thrown by Tasks
        4. 33.5.4. Returning Values from Tasks
          1. 33.5.4.1. TaskCreationOptions
          2. 33.5.4.2. Chaining Two Tasks Using Continuations
        5. 33.5.5. Preparing the Code for Concurrency and Parallelism
          1. 33.5.5.1. Synchronization Primitives
          2. 33.5.5.2. Synchronization Problems
        6. 33.5.6. Understanding Concurrent Collection Features
          1. 33.5.6.1. Systems.Collections.Concurrent
          2. 33.5.6.2. ConcurrentQueue
          3. 33.5.6.3. ConcurrentStack
        7. 33.5.7. Transforming LINQ into PLINQ
          1. 33.5.7.1. ParallelEnumerable and Its AsParallel Method
          2. 33.5.7.2. AsOrdered and Order By
          3. 33.5.7.3. Working with ForAll and a ConcurrentBag
      6. 33.6. SUMMARY
    10. 34. Deployment
      1. 34.1. APPLICATION DEPLOYMENT
        1. 34.1.1. Why Deployment Is Straightforward in .NET
        2. 34.1.2. XCOPY Deployment
        3. 34.1.3. Using the Windows Installer
        4. 34.1.4. ClickOnce Deployment
      2. 34.2. CHOOSING A FRAMEWORK VERSION
      3. 34.3. VISUAL STUDIO DEPLOYMENT PROJECTS
        1. 34.3.1. Project Templates
          1. 34.3.1.1. The CAB Project Template
          2. 34.3.1.2. The Merge Module Project Template
          3. 34.3.1.3. The Setup Project Template
          4. 34.3.1.4. The Web Setup Project Template
          5. 34.3.1.5. The Setup Wizard
        2. 34.3.2. Creating a Deployment Project
          1. 34.3.2.1. Walk-through
            1. 34.3.2.1.1. Important Properties of the Root Setup Node
            2. 34.3.2.1.2. Properties of the Primary Output Project Item
            3. 34.3.2.1.3. Properties of the Detected Dependency Items
          2. 34.3.2.2. Creating a Deployment Project for an ASP.NET Web Application
      4. 34.4. MODIFYING THE DEPLOYMENT PROJECT
        1. 34.4.1. Project Properties
          1. 34.4.1.1. The Build Page
            1. 34.4.1.1.1. Package Files
            2. 34.4.1.1.2. Prerequisites
            3. 34.4.1.1.3. Compression
            4. 34.4.1.1.4. Setting the Cabinet File Size
        2. 34.4.2. The File System Editor
          1. 34.4.2.1. Adding Items to a Folder
          2. 34.4.2.2. Adding Special Folders
          3. 34.4.2.3. Creating Shortcuts
        3. 34.4.3. The Registry Editor
          1. 34.4.3.1. Adding a Value to a Registry Key
          2. 34.4.3.2. Importing Registry Files
        4. 34.4.4. The File Types Editor
        5. 34.4.5. The User Interface Editor
          1. 34.4.5.1. Installation Modes
            1. 34.4.5.1.1. The Start Stage
            2. 34.4.5.1.2. The Progress Stage
            3. 34.4.5.1.3. The End Stage
          2. 34.4.5.2. Customizing the Order of Dialogs
          3. 34.4.5.3. Adding Dialogs
          4. 34.4.5.4. Properties of the Dialogs
        6. 34.4.6. The Custom Actions Editor
          1. 34.4.6.1. Adding a Custom Action
        7. 34.4.7. The Launch Conditions Editor
          1. 34.4.7.1. Adding a File Search
          2. 34.4.7.2. Modifying the File Search Properties
          3. 34.4.7.3. Creating a Launch Condition
        8. 34.4.8. Building
      5. 34.5. INTERNET DEPLOYMENT OF WINDOWS APPLICATIONS
        1. 34.5.1. No-Touch Deployment
          1. 34.5.1.1. Automatic Updating
          2. 34.5.1.2. Using a Launch Application
          3. 34.5.1.3. Limitations of No-Touch Deployment
        2. 34.5.2. ClickOnce Deployment
          1. 34.5.2.1. Configuring an Application for ClickOnce
          2. 34.5.2.2. Online versus Locally Installed Applications
          3. 34.5.2.3. Deploying an Online Application
          4. 34.5.2.4. Deploying an Application That Is Available Offline
          5. 34.5.2.5. Files and Directories Produced by ClickOnce
          6. 34.5.2.6. Signing the Manifest
          7. 34.5.2.7. The Update Process
          8. 34.5.2.8. ClickOnce Configuration Options
          9. 34.5.2.9. The Bootstrapper
          10. 34.5.2.10. Manual Editing of ClickOnce Manifests
          11. 34.5.2.11. Rolling Back or Uninstalling ClickOnce Applications
          12. 34.5.2.12. ClickOnce versus Other Deployment Technologies
      6. 34.6. IIS WEB DEPLOYMENT TOOL
      7. 34.7. SUMMARY
    11. A. The Visual Basic Compiler
      1. A.1. THE VBC.EXE.CONFIG FILE
      2. A.2. SIMPLE STEPS TO COMPILATION
      3. A.3. COMPILER OPTIONS
        1. A.3.1. Output Files
          1. A.3.1.1. /doc[+:-]
          2. A.3.1.2. /out
          3. A.3.1.3. /target
        2. A.3.2. Input Files
          1. A.3.2.1. /addmodule
          2. A.3.2.2. /link
          3. A.3.2.3. /recurse
          4. A.3.2.4. /reference
        3. A.3.3. Resources
          1. A.3.3.1. /linkresource
          2. A.3.3.2. /resource
          3. A.3.3.3. /win32icon
          4. A.3.3.4. /win32resource
        4. A.3.4. Code Generation
          1. A.3.4.1. /debug[+:-]
          2. A.3.4.2. /optimize[+:-]
          3. A.3.4.3. /removeintchecks[+:-]
        5. A.3.5. Errors and Warnings
          1. A.3.5.1. /nowarn
          2. A.3.5.2. /warnaserror[+:-]
        6. A.3.6. Language
          1. A.3.6.1. /define
          2. A.3.6.2. /imports
          3. A.3.6.3. /langversion
          4. A.3.6.4. /optionexplicit[+:-]
          5. A.3.6.5. /optionstrict[+:-]
          6. A.3.6.6. /optioncompare
          7. A.3.6.7. /optioninfer[+:-]
          8. A.3.6.8. /rootnamespace
        7. A.3.7. Miscellaneous Features
          1. A.3.7.1. /?
          2. A.3.7.2. /help
          3. A.3.7.3. /noconfig
          4. A.3.7.4. /nologo
          5. A.3.7.5. /quiet
        8. A.3.8. /verbose
        9. A.3.9. Advanced Features
          1. A.3.9.1. /baseaddress
          2. A.3.9.2. /bugreport
          3. A.3.9.3. /codepage
          4. A.3.9.4. /delaysign[+:-]
          5. A.3.9.5. /errorreport
          6. A.3.9.6. /filealign
          7. A.3.9.7. /keycontainer
          8. A.3.9.8. /keyfile
          9. A.3.9.9. /libpath
          10. A.3.9.10. /main
          11. A.3.9.11. /moduleassemblyname
          12. A.3.9.12. /netcf
          13. A.3.9.13. /nostdlib
          14. A.3.9.14. /platform
          15. A.3.9.15. /sdkpath
          16. A.3.9.16. /utf8output[+:-]
          17. A.3.9.17. @<file>
          18. A.3.9.18. /vbruntime[+:-]
      4. A.4. LOOKING AT THE VBC.RSP FILE
    12. B. Visual Basic Power Packs Tools
      1. B.1. VISUAL BASIC POWER PACKS
        1. B.1.1. Getting the Visual Basic Power Packs
      2. B.2. USING THE INTEROP FORMS TOOLKIT 2.1
        1. B.2.1. Creating a Simple Interop Form
        2. B.2.2. Deployment
        3. B.2.3. Debugging
        4. B.2.4. VB6 Development
        5. B.2.5. Final Interop Tips
      3. B.3. USING THE POWER PACKS 3.0 TOOLS
      4. B.4. SUMMARY
    13. C. Workflow 2008 Specifics
      1. C.1. BUILDING WORKFLOWS
        1. C.1.1. A Simple Workflow
        2. C.1.2. Standard Activities
        3. C.1.3. Building Custom Activities
      2. C.2. USING WORKFLOWS WITH OTHER APPLICATIONS
        1. C.2.1. Using Workflow Foundation with Windows Forms
      3. C.3. SUMMARY
    14. D. Enterprise Services
      1. D.1. TRANSACTIONS
        1. D.1.1. The ACID Test
      2. D.2. TRANSACTIONAL COMPONENTS
        1. D.2.1. An Example of Transactions
          1. D.2.1.1. Creating the Databases
          2. D.2.1.2. Populating Your Databases
          3. D.2.1.3. The Business Logic
            1. D.2.1.3.1. The First Half of the Transaction
            2. D.2.1.3.2. The Second Half of the Transaction
          4. D.2.1.4. Registering Your Component
          5. D.2.1.5. Giving the Assembly a Strong Name
          6. D.2.1.6. Registering with Component Services
          7. D.2.1.7. The Component Services Console
        2. D.2.2. Test Application
          1. D.2.2.1. The Transaction Attribute
          2. D.2.2.2. Invalid Data
          3. D.2.2.3. When Something Goes Wrong
      3. D.3. OTHER ASPECTS OF TRANSACTIONS
        1. D.3.1. Just-in-Time
        2. D.3.2. Object Pooling
      4. D.4. QUEUED COMPONENTS
        1. D.4.1. An Example of Queued Components
          1. D.4.1.1. Consoles Again
          2. D.4.1.2. Building the Client
          3. D.4.1.3. Queuing Invocations
        2. D.4.2. Transactions with Queued Components
      5. D.5. SUMMARY
    15. E. Programming for the Cloud
      1. E.1. THE RISE OF THE CLOUD
        1. E.1.1. Cloud Scenarios
          1. E.1.1.1. Scalability
          2. E.1.1.2. Cost Savings
          3. E.1.1.3. Parallel Processing
          4. E.1.1.4. The Case against Cloud Computing
      2. E.2. AZURE
        1. E.2.1. The Fabric
        2. E.2.2. Storage Services
          1. E.2.2.1. Blob Storage
          2. E.2.2.2. Table Storage
          3. E.2.2.3. Queues
          4. E.2.2.4. SQL Azure
        3. E.2.3. Compute Services
        4. E.2.4. Windows Azure Tools for Visual Studio
          1. E.2.4.1. Creating a Windows Azure Project
          2. E.2.4.2. Using Table Storage
          3. E.2.4.3. Using Blob Storage
          4. E.2.4.4. Using a Worker Role
        5. E.2.5. Deploying the Service
      3. E.3. SUMMARY

Product information

  • Title: Professional Visual Basic® 2010 and .NET 4
  • Author(s):
  • Release date: May 2010
  • Publisher(s): Wrox
  • ISBN: 9780470502242