You are previewing Professional C# 5.0 and .NET 4.5.1.
O'Reilly logo
Professional C# 5.0 and .NET 4.5.1

Book Description

Comprehensive, advanced coverage of C# 5.0 and .NET 4.5.1

Whether you're a C# guru or transitioning from C/C++, staying up to date is critical to your success. Professional C# 5.0 and .NET 4.5.1 is your go-to guide for navigating the programming environment for the Windows platform. After a quick refresher of the C# basics, the team of expert authors dives in to C# 5.0 and updates for NET 4.5.1. Includes:

  • Different behaviors for .NET 4.5.1 and the changes to Visual Studio 2013

  • Changes to ASP.NET Core, Web Forms, MVC, and Web API

  • Updated Windows 8 deployments and localization, event logs, and data flow

  • Shuffling of ADO.NET Entity Framework

  • Additions to Windows Workflow Foundation

  • New Windows Runtime 2.0 updates

  • Table of Contents

    1. Part I: The C# Language
      1. Chapter 1: .NET Architecture
        1. The Relationship of C# to .NET
        2. The Common Language Runtime
        3. A Closer Look at Intermediate Language
        4. Assemblies
        5. .NET Framework Classes
        6. Namespaces
        7. Creating .NET Applications Using C#
        8. The Role of C# in the .NET Enterprise Architecture
        9. Summary
      2. Chapter 2: Core C#
        1. Fundamental C#
        2. Your First C# Program
        3. Variables
        4. Predefined Data Types
        5. Flow Control
        6. Enumerations
        7. Namespaces
        8. The Main() Method
        9. More on Compiling C# Files
        10. Console I/O
        11. Using Comments
        12. The C# Preprocessor Directives
        13. C# Programming Guidelines
        14. Summary
      3. Chapter 3: Objects and Types
        1. Creating and Using Classes
        2. Classes and Structs
        3. Classes
        4. Anonymous Types
        5. Structs
        6. Weak References
        7. Partial Classes
        8. Static Classes
        9. The Object Class
        10. Extension Methods
        11. Summary
      4. Chapter 4: Inheritance
        1. Inheritance
        2. Types of Inheritance
        3. Implementation Inheritance
        4. Modifiers
        5. Interfaces
        6. Summary
      5. Chapter 5: Generics
        1. Generics Overview
        2. Creating Generic Classes
        3. Generics Features
        4. Generic Interfaces
        5. Generic Structs
        6. Generic Methods
        7. Summary
      6. Chapter 6: Arrays and Tuples
        1. Multiple Objects of the Same and Different Types
        2. Simple Arrays
        3. Multidimensional Arrays
        4. Jagged Arrays
        5. Array Class
        6. Arrays as Parameters
        7. Enumerations
        8. Tuples
        9. Structural Comparison
        10. Summary
      7. Chapter 7: Operators and Casts
        1. Operators and Casts
        2. Operators
        3. Type Safety
        4. Comparing Objects for Equality
        5. Operator Overloading
        6. User-Defined Casts
        7. Summary
      8. Chapter 8: Delegates, Lambdas, and Events
        1. Referencing Methods
        2. Delegates
        3. Lambda Expressions
        4. Events
        5. Summary
      9. Chapter 9: Strings and Regular Expressions
        1. Examining System.String
        2. Regular Expressions
        3. Summary
      10. Chapter 10: Collections
        1. Overview
        2. Collection Interfaces and Types
        3. Lists
        4. Queues
        5. Stacks
        6. Linked Lists
        7. Sorted List
        8. Dictionaries
        9. Sets
        10. Observable Collections
        11. Bit Arrays
        12. Immutable Collections
        13. Concurrent Collections
        14. Performance
        15. Summary
      11. Chapter 11: Language Integrated Query
        1. LINQ Overview
        2. Standard Query Operators
        3. Parallel LINQ
        4. Expression Trees
        5. LINQ Providers
        6. Summary
      12. Chapter 12: Dynamic Language Extensions
        1. Dynamic Language Runtime
        2. The Dynamic Type
        3. Hosting the DLR ScriptRuntime
        4. DynamicObject and ExpandoObject
        5. Summary
      13. Chapter 13: Asynchronous Programming
        1. Why Asynchronous Programming Is Important
        2. Asynchronous Patterns
        3. Foundation of Asynchronous Programming
        4. Error Handling
        5. Cancellation
        6. Summary
      14. Chapter 14: Memory Management and Pointers
        1. Memory Management
        2. Memory Management Under the Hood
        3. Freeing Unmanaged Resources
        4. Unsafe Code
        5. Summary
      15. Chapter 15: Reflection
        1. Manipulating and Inspecting Code at Runtime
        2. Custom Attributes
        3. Using Reflection
        4. Summary
      16. Chapter 16: Errors and Exceptions
        1. Introduction
        2. Exception Classes
        3. Catching Exceptions
        4. User-Defined Exception Classes
        5. Caller Information
        6. Summary
    2. Part II: Visual Studio
      1. Chapter 17: Visual Studio 2013
        1. Working with Visual Studio 2013
        2. Creating a Project
        3. Exploring and Coding a Project
        4. Building a Project
        5. Debugging Your Code
        6. Refactoring Tools
        7. Architecture Tools
        8. Analyzing Applications
        9. Unit Tests
        10. Windows Store Apps, WCF, WF, and More
        11. Summary
      2. Chapter 18: Deployment
        1. Deployment as Part of the Application Life Cycle
        2. Planning for Deployment
        3. Traditional Deployment
        4. ClickOnce
        5. Web Deployment
        6. Windows Store Apps
        7. Summary
    3. Part III: Foundation
      1. Chapter 19: Assemblies
        1. What are Assemblies?
        2. Application Domains
        3. Shared Assemblies
        4. Configuring .NET Applications
        5. Versioning
        6. Sharing Assemblies Between Different Technologies
        7. Summary
      2. Chapter 20: Diagnostics
        1. Diagnostics Overview
        2. Code Contracts
        3. Tracing
        4. Event Logging
        5. Performance Monitoring
        6. Summary
      3. Chapter 21: Tasks, Threads, and Synchronization
        1. Overview
        2. Parallel Class
        3. Tasks
        4. Cancellation Framework
        5. Thread Pools
        6. The Thread Class
        7. Threading Issues
        8. Synchronization
        9. Timers
        10. Data Flow
        11. Summary
      4. Chapter 22: Security
        1. Introduction
        2. Authentication and Authorization
        3. Encryption
        4. Access Control to Resources
        5. Code Access Security
        6. Distributing Code Using Certificates
        7. Summary
      5. Chapter 23: Interop
        1. .NET and COM
        2. Using a COM Component from a .NET Client
        3. Using a .NET Component from a COM Client
        4. Platform Invoke
        5. Summary
      6. Chapter 24: Manipulating Files and the Registry
        1. File and the Registry
        2. Managing the File System
        3. Moving, Copying, and Deleting Files
        4. Reading and Writing to Files
        5. Mapped Memory Files
        6. Reading Drive Information
        7. File Security
        8. Reading and Writing to the Registry
        9. Reading and Writing to Isolated Storage
        10. Summary
      7. Chapter 25: Transactions
        1. Introduction
        2. Overview
        3. Database and Entity Classes
        4. Traditional Transactions
        5. System.Transactions
        6. Dependent Transactions
        7. Isolation Level
        8. Custom Resource Managers
        9. File System Transactions
        10. Summary
      8. Chapter 26: Networking
        1. Networking
        2. The HttpClient Class
        3. Displaying Output as an HTML Page
        4. Utility Classes
        5. Lower-Level Protocols
        6. Summary
      9. Chapter 27: Windows Services
        1. What Is a Windows Service?
        2. Windows Services Architecture
        3. Creating a Windows Service Program
        4. Monitoring and Controlling Windows Services
        5. Troubleshooting and Event Logging
        6. Summary
      10. Chapter 28: Localization
        1. Global Markets
        2. Namespace System.Globalization
        3. Resources
        4. Windows Forms Localization Using Visual Studio
        5. Localization with ASP.NET Web Forms
        6. Localization with WPF
        7. A Custom Resource Reader
        8. Creating Custom Cultures
        9. Localization with Windows Store Apps
        10. Summary
      11. Chapter 29: Core XAML
        1. Uses of XAML
        2. XAML Foundation
        3. Dependency Properties
        4. Bubbling and Tunneling Events
        5. Attached Properties
        6. Markup Extensions
        7. Reading and Writing XAML
        8. Summary
      12. Chapter 30: Managed Extensibility Framework
        1. Introduction
        2. MEF Architecture
        3. Defining Contracts
        4. Exporting Parts
        5. Importing Parts
        6. Containers and Export Providers
        7. Catalogs
        8. Summary
      13. Chapter 31: Windows Runtime
        1. Overview
        2. Windows Runtime Components
        3. Windows Store Apps
        4. The Life Cycle of Applications
        5. Application Settings
        6. Summary
    4. PART IV: Data
      1. Chapter 32: Core ADO.NET
        1. ADO.NET Overview
        2. Using Database Connections
        3. Commands
        4. Fast Data Access: The Data Reader
        5. Asynchronous Data Access: Using Task and Await
        6. Managing Data and Relationships: The DataSet Class
        7. XML Schemas: Generating Code with XSD
        8. Populating a DataSet
        9. Persisting DataSet Changes
        10. Working with ADO.NET
        11. Summary
      2. Chapter 33: ADO.NET Entity Framework
        1. Programming with the Entity Framework
        2. Entity Framework Mapping
        3. Entities
        4. Data Context
        5. Relationships
        6. Querying Data
        7. Writing Data to the Database
        8. Using the Code First Programming Model
        9. Summary
      3. Chapter 34: Manipulating XML
        1. XML
        2. XML Standards Support in .NET
        3. Introducing the System.Xml Namespace
        4. Using System.Xml Classes
        5. Reading and Writing Streamed XML
        6. Using the DOM in .NET
        7. Using XPathNavigators
        8. XML and ADO.NET
        9. Serializing Objects in XML
        10. LINQ to XML and .NET
        11. Working with Different XML Objects
        12. Using LINQ to Query XML Documents
        13. More Query Techniques for XML Documents
        14. Summary
    5. Part V: Presentation
      1. Chapter 35: Core WPF
        1. Understanding WPF
        2. Shapes
        3. Geometry
        4. Transformation
        5. Brushes
        6. Controls
        7. Layout
        8. Styles and Resources
        9. Triggers
        10. Templates
        11. Animations
        12. Visual State Manager
        13. 3-D
        14. Summary
      2. Chapter 36: Business Applications with WPF
        1. Introduction
        2. Menu and Ribbon Controls
        3. Commanding
        4. Data Binding
        5. TreeView
        6. DataGrid
        7. Summary
      3. Chapter 37: Creating Documents with WPF
        1. Introduction
        2. Text Elements
        3. Flow Documents
        4. Fixed Documents
        5. XPS Documents
        6. Printing
        7. Summary
      4. Chapter 38: Windows Store Apps: User Interface
        1. Overview
        2. Microsoft Modern Design
        3. Sample Application Core Functionality
        4. App Bars
        5. Launching and Navigation
        6. Layout Changes
        7. Storage
        8. Pickers
        9. Live Tiles
        10. Summary
      5. Chapter 39: Windows Store Apps: Contracts and Devices
        1. Overview
        2. Searching
        3. Sharing Contract
        4. Camera
        5. Geolocation
        6. Sensors
        7. Summary
      6. Chapter 40: Core ASP.NET
        1. .NET Frameworks for Web Applications
        2. Web Technologies
        3. Hosting and Configuration
        4. Handlers and Modules
        5. Global Application Class
        6. Request and Response
        7. State Management
        8. ASP.NET Identity System
        9. Summary
      7. Chapter 41: ASP.NET Web Forms
        1. Overview
        2. ASPX Page Model
        3. Master Pages
        4. Navigation
        5. Validating User Input
        6. Accessing Data
        7. Security
        8. Ajax
        9. Summary
      8. Chapter 42: ASP.NET MVC
        1. ASP.NET MVC Overview
        2. Defining Routes
        3. Creating Controllers
        4. Creating Views
        5. Submitting Data from the Client
        6. HTML Helpers
        7. Creating a Data-Driven Application
        8. Action Filters
        9. Authentication and Authorization
        10. Summary
    6. Part VI: Communication
      1. Chapter 43: Windows Communication Foundation
        1. WCF Overview
        2. Creating a Simple Service and Client
        3. Contracts
        4. Service Behaviors
        5. Binding
        6. Hosting
        7. Clients
        8. Duplex Communication
        9. Routing
        10. Summary
      2. Chapter 44: ASP.NET Web API
        1. Overview
        2. Creating Services
        3. Creating a .NET Client
        4. Web API Routing and Actions
        5. Using OData
        6. Security with the Web API
        7. Self-Hosting
        8. Summary
      3. Chapter 45: Windows Workflow Foundation
        1. A Workflow Overview
        2. Hello World
        3. Activities
        4. Custom Activities
        5. Workflows
        6. Summary
      4. Chapter 46: Peer-to-Peer Networking
        1. Peer-to-Peer Networking Overview
        2. Peer Name Resolution Protocol (PNRP)
        3. Building P2P Applications
        4. Summary
      5. Chapter 47: Message Queuing
        1. Overview
        2. Message Queuing Products
        3. Message Queuing Architecture
        4. Message Queuing Administrative Tools
        5. Programming Message Queuing
        6. Course Order Application
        7. Receiving Results
        8. Transactional Queues
        9. Message Queuing with WCF
        10. Message Queue Installation
        11. Summary
    7. Introduction
    8. Advertisement
    9. End User License Agreement