You are previewing C# 4.0 Unleashed.
O'Reilly logo
C# 4.0 Unleashed

Book Description

C# 4.0 Unleashed is a practical reference focusing on the C# language and the .NET platform as a whole. While covering the language in lots of detail, it also provides enough coverage of various popular .NET technologies and techniques (such as debugging) for the reader to be successful on the .NET platform. The in-depth coverage of the language features is crucial to the success of a developer. Knowing exactly where and why to use certain language features can boost efficiency significantly. This book differs from other works by going into enough depth on how things work, while not being a clone of the formal language specification. Concise anecdotes with concrete samples illustrate how certain language features behave, and also point out possible caveats in using them. On the side of platform coverage, the author provides a gentle introduction to the wide landscape of the .NET platform, following a logical structure that reflects the high-level architecture of an application: presentation, logic, data, connectivity, etc. In the .NET part of the book there's coverage of relevant new technologies such as cloud computing, modeling, and parallel programming - things that will gain much more attention moving forward.

  • Provides valuable insight into the C# language and the .NET Framework - not just "what" but also the "how" and "why" of the language and framework features

  • Covers using C# with new major technologies, such as cloud computing, SharePoint, and ASP.NET MVC

  • Author is Microsoft insider

  • Will be day and date with the release of C# 4.0

  • Table of Contents

    1. Title Page
    2. Copyright Page
    3. Contents at a Glance
      1. Contents at a Glance
    4. Table of Contents
      1. Table of Contents
    5. About the Author
      1. About the Author
    6. Acknowledgments
      1. Acknowledgments
    7. We Want to Hear from You!
      1. We Want to Hear from You!
    8. Reader Services
      1. Reader Services
    9. Introduction
      1. Introduction
      2. Who Should Read This Book?
      3. What You Need to Know Before You Read This Book
      4. How This Book Is Organized
    10. Part I. Introduction
      1. Chapter 1. Introducing the .NET Platform
        1. Chapter 1. Introducing the .NET Platform
        2. A Historical Perspective
          1. Win32 Programming in C
          2. Raising the Abstraction Level with MFC and C++
          3. Component-Driven Development with COM
          4. Windows Development for the Masses in Visual Basic
          5. Reaching Out to the Web with Windows DNA
          6. Reaching Out to Java with J++
          7. Time for Lightning
        3. A 10,000-Feet View of the .NET Platform
          1. The .NET Platform
        4. The Common Language Infrastructure
        5. The Multilanguage Aspect of .NET
        6. Introducing .NET Assemblies
        7. The Common Type System Explained
          1. What’s Type Safety?
          2. Primitive Types
          3. Classes, Structures, and Enumerations
          4. Interfaces
          5. Delegates
          6. Members
          7. A Note on Generics
          8. The Role of the Common Language Specification
        8. Executing Managed Code
          1. The Assembly Manifest
          2. IL Code
          3. Metadata
          4. Mixing Languages
        9. Diving into the Common Language Runtime
          1. Bootstrapping the Runtime
          2. Assembly Loading
          3. Application Domains
          4. JIT Compilation
          5. Native Image Generation
          6. Automatic Memory Management
          7. Exception Handling
          8. Code Access Security
          9. Interoperability Facilities
        10. The Base Class Library
        11. Summary
      2. Chapter 2. Introducing the C# Programming Language
        1. Chapter 2. Introducing the C# Programming Language
        2. The Evolution of C#
          1. C# 1.0: Managed Code Development, Take One
          2. C# 2.0: Enriching the Core Language Features
          3. C# 3.0: Bridging the Gap Between Objects and Data
          4. C# 4.0: Reaching Out to Dynamic Languages
        3. A Sneak Peek at the Future
          1. Multiparadigm
          2. Language-Shaping Forces
          3. Compiler as a Service
          4. Taming the Concurrency Beast
        4. Summary
      3. Chapter 3. Getting Started with .NET Development Using C#
        1. Chapter 3. Getting Started with .NET Development Using C#
        2. Installing the .NET Framework
          1. The .NET Framework Version Landscape
          2. .NET Framework 4
          3. Running the Installer
          4. What Got Installed?
        3. Your First Application: Take One
          1. Writing the Code
          2. Compiling It
          3. Running It
          4. Inspecting Our Assembly with .NET Reflector
        4. Visual Studio 2010
          1. Editions
          2. Expression
          3. Installing Visual Studio 2010
          4. A Quick Tour Through Visual Studio 2010
        5. Your First Application: Take Two
          1. New Project Dialog
          2. Solution Explorer
          3. Project Properties
          4. Code Editor
          5. Build Support
          6. Debugging Support
          7. Object Browser
          8. Code Insight
          9. Integrated Help
          10. Designers
          11. Server Explorer
          12. Database Mappers
          13. Unit Testing
          14. Team Development
        6. Summary
    11. Part II. C#—The Language
      1. Chapter 4. Language Essentials
        1. Chapter 4. Language Essentials
        2. The Entry Point
          1. A Trivial Console Application
          2. Method Signatures
          3. Allowed Entry-Point Signatures
          4. Running the Sample
          5. Under the Hood
        3. Keywords
          1. Contextual Keywords
          2. Syntax Highlighting in Visual Studio
        4. A Primer on Types
          1. Code and Data
          2. Types, Objects, and Instances
          3. Variables
          4. Classes and Other Types
        5. Built-In Types
          1. Integral Types
          2. Floating-Point Types
          3. The Decimal Type
          4. The Boolean Type
          5. The String Type
          6. Object
          7. Dynamic Typing
          8. A Word on CLS Compliance
          9. A Matter of Style: Aliases or Not?
        6. Local Variables
          1. Declaration
          2. Scope
          3. Assignment
          4. Constants
          5. Implicitly Typed Local Variable Declarations
        7. Intermezzo on Comments
          1. Single-Line Comments
          2. A Primer to Preprocessing Directives
          3. Delimited Comments
          4. Documentation Comments
        8. Arrays
          1. Internal Representation
          2. Single-Dimensional Arrays
          3. Array Initializers
          4. Jagged Arrays
          5. Multidimensional Arrays
        9. The Null Reference
          1. What’s Null Really?
          2. A Common Source of Bugs
        10. Nullable Value Types
          1. Internal Representation
          2. Use in C#
          3. A Type Background
        11. Summary
      2. Chapter 5. Expressions and Operators
        1. Chapter 5. Expressions and Operators
        2. What Are Expressions?
          1. Arity of Operators
          2. Precedence and Associativity
          3. Evaluation of Subexpressions
        3. The Evaluation Stack
        4. Arithmetic Operators
          1. Integer Arithmetic
          2. Floating-Point Arithmetic
          3. Decimal Arithmetic
          4. Character Arithmetic
          5. Unary Plus and Minus
          6. Overflow Checking
          7. Arithmetic with Nullables
        5. String Concatenation
        6. Shift Operators
        7. Relational Operators
          1. Equality for Different Types
          2. Lifted Operators
        8. Logical Operators
          1. Integral Bitwise Logical Operators
          2. Use for Enumerations
          3. Boolean Logical Operators
          4. Nullable Boolean Logic
        9. Conditional Operators
          1. Under the Hood
        10. An Operator’s Result Type
          1. Associativity
        11. Null-Coalescing Operator
        12. Assignment
          1. Decaration Versus (Simple) Assignment
          2. Compound Assignment
          3. A Gentle Introduction to Definite Assignment
          4. Postfix and Prefix Increment and Decrement Operators
        13. Summary
      3. Chapter 6. A Primer on Types and Objects
        1. Chapter 6. A Primer on Types and Objects
        2. Implicit Versus Explicit Conversions
          1. Cast Expressions
          2. The is Operator
          3. The as Operator
          4. Intermezzo: The Mythical Type Switch
        3. The typeof Operator: A Sneak Peek at Reflection
        4. Default Value Expression
        5. Creating Objects with the new Operator
          1. Behind the Scenes of Constructors
          2. Object Initializers
          3. Collection Initializers
        6. Member Access
          1. A First Look at Dynamic Typing
        7. Invocation Expressions
          1. Method Invocation
          2. Delegate Invocation
        8. Element Access
        9. Summary
      4. Chapter 7. Simple Control Flow
        1. Chapter 7. Simple Control Flow
        2. What Are Statements, Anyway?
        3. Expression Statements
          1. Method Calls
          2. Assignments
          3. Pre- and Post-Increment/Decrement
        4. The Empty Statement
        5. Blocks
        6. Declarations
        7. Selection Statements
          1. The if Statement
          2. The switch Statement
        8. Iteration Statements
          1. The while Statement
          2. The do...while Statement
          3. The for Statement
          4. The foreach Statement
        9. A Peek at Iterators
        10. Loops in the Age of Concurrency
        11. The goto Statement
        12. The return Statement
        13. Summary
      5. Chapter 8. Basics of Exceptions and Resource Management
        1. Chapter 8. Basics of Exceptions and Resource Management
        2. Exception Handling
          1. Exceptions Are Objects
          2. Causes of Exceptions
          3. Throwing Exceptions
          4. Handling Exceptions
          5. The finally Clause
        3. Deterministic Resource Cleanup
          1. Garbage Collection in a Nutshell
          2. Object Disposal
          3. The using Statement
          4. Implementing IDisposable
          5. (In)appropriate Use of IDisposable
        4. Locking on Objects
          1. Under the Hood
          2. The lock Statement
          3. Intermezzo: Code Generation for Lock
          4. Be Careful with Locks
        5. Summary
      6. Chapter 9. Introducing Types
        1. Chapter 9. Introducing Types
        2. Types Revisited
        3. Classes Versus Structs
          1. References Versus Values
          2. Heap Versus Stack
          3. Boxing
          4. The Dangers of Mutable Value Types
        4. Type Members
          1. Visibility
          2. Static Versus Instance
          3. Partial Types
        5. Summary
      7. Chapter 10. Methods
        1. Chapter 10. Methods
        2. Defining Methods
        3. Return Type
        4. Parameters
          1. Value Parameters
          2. Reference Parameters
          3. Output Parameters
          4. Parameter Arrays
          5. Optional and Named Parameters
        5. Overloading
          1. Defining Method Overloads
          2. Method Groups
          3. Overload Resolution
        6. Extension Methods
          1. Defining Extension Methods
          2. Overload Resolution
          3. Using Extension Methods
          4. How the Compiler Marks and Finds Extension Methods
        7. Partial Methods
        8. Extern Methods
        9. Refactoring
        10. Code Analysis
        11. Summary
      8. Chapter 11. Fields, Properties, and Indexers
        1. Chapter 11. Fields, Properties, and Indexers
        2. Declaring Fields
        3. Accessing Fields
        4. Initializing Fields
        5. Read-Only Fields
        6. Constants
        7. Volatile Fields
        8. An Intermezzo About Enums
          1. Why Enums Matter
          2. Underlying Types
          3. Assigning Values to Members
          4. The System.Enum Type
          5. Flags
          6. Revisiting the switch Statement
          7. Behind the Scenes
        9. Properties
          1. Declaring and Using Properties
          2. Auto-Implemented Properties
          3. How Properties Work
          4. Defining Indexers
          5. How Indexers Are Implemented
        10. Summary
      9. Chapter 12. Constructors and Finalizers
        1. Chapter 12. Constructors and Finalizers
        2. Constructors
          1. Instance Constructors
        3. Static Constructors
        4. Destructors (Poorly Named Finalizers)
          1. Defining Finalizers in C#
          2. How Finalizers Are Run
          3. How Finalizers Are Implemented
          4. Disposal Before Collection: IDisposable
        5. Summary
      10. Chapter 13. Operator Overloading and Conversions
        1. Chapter 13. Operator Overloading and Conversions
        2. Operators
          1. Defining Operators
          2. How Operators Are Found
          3. Nullability and Lifted Operators
          4. Which Operators Can Be Overloaded?
          5. Implementing Equality Operations
          6. How Operators Are Translated
        3. Conversions
          1. Built-In Conversions
          2. User-Defined Conversions
          3. Other Conversion Mechanisms
        4. Summary
      11. Chapter 14. Object-Oriented Programming
        1. Chapter 14. Object-Oriented Programming
        2. The Cornerstones of Object Orientation
          1. A Historical Perspective
          2. Encapsulation
          3. Inheritance
          4. Polymorphism
          5. Types in Pictures
        3. Inheritance for Classes
          1. Single Inheritance for Classes
          2. Multiple Inheritance for Interfaces
          3. Blocking Inheritance
          4. Hiding Base Class Members
        4. Protected Accessibility
        5. Polymorphism and Virtual Members
          1. Virtual Members
          2. Overriding Virtual Members
          3. Declaring Virtual Members
          4. Sealing and Hiding: Take Two
          5. How Virtual Dispatch Works
          6. How Base Calls Work
        6. Abstract Classes
        7. Interfaces
          1. Defining Interfaces
          2. Some Design Recommendations
          3. Implementing Interfaces
        8. Summary
      12. Chapter 15. Generic Types and Methods
        1. Chapter 15. Generic Types and Methods
        2. Life Without Generics
          1. A Real-World Example with Collections
          2. Performance Worries
        3. Getting Started with Generics
        4. Declaring Generic Types
        5. Using Generic Types
        6. Performance Intermezzo
        7. Operations on Type Parameters
          1. Default Values
          2. Getting the Type’s Reflection Info Object
        8. Generic Constraints
          1. Interface-Based Constraints
          2. Base Class Constraints
          3. Default Constructor Constraint
          4. Restriction to Value Types or Reference Types
        9. Generic Methods
        10. Co- and Contravariance
          1. Annoyances with Generic Types
          2. Broken Covariance for Array Types
          3. Safety Guarantees
          4. Generic Co- and Contravariance
          5. Under the Hood
          6. Where to Use
        11. Summary
      13. Chapter 16. Collection Types
        1. Chapter 16. Collection Types
        2. Nongeneric Collection Types
          1. ArrayList
          2. Hash Tables
          3. Queue
          4. Stack
          5. Summary
        3. Generic Collection Types
          1. List<T>
          2. SortedDictionary<TKey, TValue> and SortedList<TKey, TValue>
          3. Queue<T> and Stack<T>
        4. Other Collection Types
        5. Summary
      14. Chapter 17. Delegates
        1. Chapter 17. Delegates
        2. Functional Programming
          1. Historical Perspective
          2. Programming with Functions
        3. What Are Delegates?
        4. Delegate Types
        5. Delegate Instances
          1. Anonymous Function Expressions
          2. Closures: Captured Outer Variables
          3. Lambda Expressions
          4. Expression Trees
        6. Invoking Delegates
        7. Putting It Together: An Extensible Calculator
        8. Case Study: Delegates Used in LINQ to Objects
        9. Asynchronous Invocation
        10. Combining Delegates
        11. Summary
      15. Chapter 18. Events
        1. Chapter 18. Events
        2. The Two Sides of Delegates
        3. A Reactive Application
          1. Using Delegates
          2. Limitations on Plain Use of Delegates
          3. Using .NET Events
        4. How Events Work
        5. Raising Events, the Correct Way
        6. Add and Remove Accessors
        7. Detach Your Event Handlers
        8. Recommended Event Patterns
          1. EventHandler and EventArgs
          2. EventHandler<T>
          3. Designing Events for Use by Derived Classes
        9. Case Study: INotifyProperty Interfaces and UI Programming
          1. Events in UI Frameworks
        10. Countdown, the GUI Way
        11. Modern Approaches to Reactive Programming
          1. Events Revisited
          2. Pull Versus Push
          3. Dictionary Suggest Revisited
        12. Summary
      16. Chapter 19. Language Integrated Query Essentials
        1. Chapter 19. Language Integrated Query Essentials
        2. Life Without LINQ
          1. In-Memory Data
          2. Relational Databases
          3. XML
          4. The Birth of LINQ
        3. LINQ by Example
          1. In-Memory Data
          2. Relational Databases
          3. XML
        4. Query Expression Syntax
          1. Why Query Expressions?
          2. Getting Started
          3. Source Selection Using a from Clause
          4. Projection Using the Select Clause
          5. Filtering Using a where Clause
          6. Ordering Using the orderby Keyword
          7. Grouping Using the group by Clause
          8. Joining Using the join Clause
          9. Continuing a Query Expression Using the into Clause
          10. Bindings with the let Clause
        5. Summary
      17. Chapter 20. Language Integrated Query Internals
        1. Chapter 20. Language Integrated Query Internals
        2. How LINQ to Objects Works
          1. IEnumerable<T> and IEnumerator<T> Recap
          2. LINQ to Objects Extension Methods
          3. Iterators
          4. Lazy Evaluation
          5. How Iterators Work
        3. Standard Query Operators
          1. Source Generators
          2. Restriction
          3. Projection
          4. Ordering
          5. Grouping and Joining
          6. Aggregation
          7. Predicates
          8. Set Theoretical and Sequencing Operators
          9. Sequence Persistence
          10. Remote Versus Local with AsEnumerable
        4. The Query Pattern
          1. All About Methods
          2. Overloading Query Expression Syntax
        5. Parallel LINQ
          1. The Cost of Optimization
          2. AsParallel
          3. How PLINQ Works
          4. AsOrdered
          5. Tweaking Parallel Querying Behavior
          6. Parallel Enumeration with ForAll
        6. Expression Trees
          1. Query Expression Translation
          2. Homoiconicity for Dummies
          3. Expression Trees for Query Expressions
          4. IQueryable<T>
        7. Summary
      18. Chapter 21. Reflection
        1. Chapter 21. Reflection
        2. Typing Revisited, Static and Otherwise
          1. The Role of Metadata
          2. The Multilanguage World
          3. Taking Multilanguage to the Next Level
          4. How Does All of This Relate to C# Programming?
        3. Reflection
          1. System.Type
          2. A Primer on Application Extensibility
          3. Reflection for Methods, Properties, Events, and More
          4. Custom Attributes
        4. Lightweight Code Generation
          1. Hello LCG
          2. A Toy Compiler for Arithmetic Expressions
        5. Expression Trees
          1. Compiler-Generated Expression Trees
          2. The Expression Tree API
          3. Using the ExpressionTreeVisitor
        6. Summary
      19. Chapter 22. Dynamic Programming
        1. Chapter 22. Dynamic Programming
        2. The dynamic Keyword in C# 4.0
          1. The dynamic Type
          2. Dynamic Typing Is Contagious
          3. Deferred Overload Resolution
          4. No System.Dynamic Type
          5. When to Use dynamic: Case Study with IronPython
        3. DLR Internals
          1. Dynamic Call Sites and Binders
          2. Dynamic Dispatch
          3. Custom Dynamic Objects with DynamicObject
          4. A Primer to DynamicMetaObject
          5. Dynamic Operations
          6. Overall Architecture
        4. Office and COM Interop
          1. Essentials of COM Interop
          2. Simplified COM Interop in .NET 4
          3. Case Study: COM Interop with Excel and Word
        5. Summary
      20. Chapter 23. Exceptions
        1. Chapter 23. Exceptions
        2. Life Without Exceptions
          1. Win32
          2. COM
          3. Lessons Learned
        3. Introducing Exceptions
        4. Exception Handling
          1. try Statements
          2. First-Chance Exceptions
          3. Intermezzo on Historical Debugging with IntelliTrace
          4. When and What to Catch
          5. Beyond Your Control
        5. Throwing Exceptions
        6. Defining Your Own Exception Types
        7. (In)famous Exception Types
          1. DivideByZeroException
          2. OverflowException
          3. NullReferenceException
          4. IndexOutOfRangeException
          5. InvalidCastException
          6. ArrayTypeMismatchException
          7. TypeInitializationException
          8. ObjectDisposedException
          9. OutOfMemoryException
          10. StackOverflowException
          11. ExecutionEngineException
          12. ArgumentException
          13. ArgumentNullException
          14. ArgumentOutOfRangeException
          15. InvalidOperationException
          16. NotImplementedException
          17. NotSupportedException
          18. FormatException
          19. AggregateException
        8. Summary
      21. Chapter 24. Namespaces
        1. Chapter 24. Namespaces
        2. Organizing Types in Namespaces
          1. Once Upon a Time
          2. Assemblies and Namespaces
        3. Declaring Namespaces
          1. Naming Conventions
          2. Visibility
          3. Name Clashes Within Namespaces
        4. Importing Namespaces
          1. Name Clashes Due to Imports
          2. Using Aliases
          3. Extern Aliases
          4. Extension Methods
        5. Summary
      22. Chapter 25. Assemblies and Application Domains
        1. Chapter 25. Assemblies and Application Domains
        2. Assemblies
          1. Modules and Assemblies
          2. Types of Assemblies
          3. Assembly Properties
          4. Naming, Versioning, and Deployment
          5. Strong Naming
          6. The Global Assembly Cache
          7. Referencing Assemblies
          8. How Assemblies Get Loaded at Runtime
          9. Native Image Generation (NGEN)
          10. Visibility Aspects
          11. Embedded Resources
          12. Type Forwarding
          13. Reflection Flashback
        3. Application Domains
          1. Creating Application Domains
          2. Cross-Domain Communication
          3. The Managed Add-In Framework
        4. Summary
    12. Part III. Working with Base Class Libraries
      1. Chapter 26. Base Class Library Essentials
        1. Chapter 26. Base Class Library Essentials
        2. The BCL: What, Where, and How?
          1. What Is Covered?
          2. Default Project References
          3. Namespaces Versus Assemblies
          4. The System and mscorlib Assemblies
          5. System.Core’s Story of Red Bits and Green Bits
        3. The Holy System Root Namespace
          1. Primitive Value Types
          2. Working with Arrays
          3. The Math Class
          4. BigInteger: Beyond 32-bit and 64-bit Integers
          5. Complex Numbers
          6. Generating Random Numbers
          7. Working with Date and Time
          8. GUID Values
          9. Nullability Revisited Briefly
          10. The Uri Type
          11. Interacting with the Environment
          12. Leave the GC Alone (Most of the Time)
          13. Native Interop with IntPtr
          14. Lazy Initialization Using Lazy<T>
          15. Tuple Types
        4. Facilities to Work with Text
          1. Formatting Text
          2. Parsing Text to Objects
          3. Regular Expressions
          4. Commonly Used String Methods
          5. The StringBuilder Class
          6. Text Encoding
        5. Summary
      2. Chapter 27. Diagnostics and Instrumentation
        1. Chapter 27. Diagnostics and Instrumentation
        2. Ensuring Code Quality
          1. Code Analysis
          2. Asserts and Contracts
          3. Diagnostic Debugger Output
          4. Controlling the Debugger
          5. Logging Stack Traces
          6. Measuring Performance Using StopWatch
        3. Instrumentation
          1. Using Event Logs
          2. Monitoring with Performance Counters
          3. Other Manageability Frameworks
        4. Controlling Processes
          1. Querying Process Information
          2. Starting Processes
        5. Summary
      3. Chapter 28. Working with I/O
        1. Chapter 28. Working with I/O
        2. Files and Directories
          1. Listing Drives
          2. Working with Directories
          3. Working with Paths
          4. The FileInfo Class
        3. Monitoring File System Activity
        4. Readers and Writers
          1. The File Class
          2. TextReader and TextWriter
        5. Streams: The Bread and Butter of I/O
          1. Memory Streams
          2. Working with Files: Take Two
          3. BinaryReader and BinaryWriter
          4. Asynchronous Read and Write Operations
          5. Streams Are Everywhere
        6. A Primer to (Named) Pipes
        7. Memory-Mapped Files in a Nutshell
        8. Overview of Other I/O Capabilities
        9. Summary
      4. Chapter 29. Threading and Synchronization
        1. Chapter 29. Threading and Synchronization
        2. Using Threads
          1. Explaining the Concept of Threads
          2. The Managed Code Story
          3. Where It All Starts: The Thread Class
          4. More About a Thread’s Life Cycle
          5. Managed Thread Characteristics
          6. Dealing with Exceptions
          7. Thread-Specific State
          8. Essential Threading Debugging Techniques
        3. Thread Pools
          1. .NET’s Thread Pool
        4. Synchronization Primitives
          1. Atomicity (or Lack Thereof) Illustrated
          2. Monitors and the lock Keyword
          3. Mutexes
          4. Semaphores
          5. More Advanced Locks
          6. Signaling with Events
          7. Interlocked Helpers
          8. More Synchronization Mechanisms
          9. BackgroundWorker
        5. Summary
      5. Chapter 30. Task Parallelism and Data Parallelism
        1. Chapter 30. Task Parallelism and Data Parallelism
        2. Pros and Cons of Threads
          1. Cutting Costs
          2. An Ideal Number of Threads?
        3. The Task Parallel Library
          1. Architecture
          2. Declarative Versus Imperative
          3. What Are Tasks?
        4. Task Parallelism
          1. Creating and Starting Tasks
          2. Retrieving a Task’s Result
          3. Dealing with Errors
          4. Continuations
          5. Cancellation of Tasks
          6. Parallel Invocation
          7. Waiting for Multiple Tasks
          8. How the Task Scheduler Works
        5. Data Parallelism
          1. Parallel For Loops
          2. Parallel Foreach Loops
        6. Summary
    13. Index