Professional C# 2012 and .NET 4.5

Book description

Intermediate to advanced technique coverage, updated for C# 2012 and .NET 4.5

This guide is geared towards experienced programmers looking to update and enhance their skills in writing Windows applications, web apps, and Metro apps with C# and .NET 4.5. Packed with information about intermediate and advanced features, this book includes everything professional developers need to know about C# and putting it to work.

  • Covers challenging .NET features including Language Integrated Query (LINQ), LINQ to SQL, LINQ to XML, WCF, WPF, Workflow, and Generics

  • Puts the new Async keyword to work and features refreshers on .NET architecture, objects, types, inheritance, arrays, operators, casts, delegates, events, strings, regular expressions, collections, and memory management

  • Explores new options and interfaces presented by Windows 8 development, WinRT, and Metro style apps

  • Includes traditional Windows forms programming, ASP.NET web programming with C#, and working in Visual Studio 2012 with C#

Professional C# 2012 and .NET 4.5 is a comprehensive guide for experienced programmers wanting to maximize these technologies.

Table of contents

  1. Cover
  2. Contents
  3. 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. Concurrent Collections
      13. Performance
      14. 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
  4. Part II: Visual Studio
    1. Chapter 17: Visual Studio 2012
      1. Working with Visual Studio 2012
      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 8, 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 8 Apps
      7. Summary
  5. 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 WebClient Class
      3. WebRequest and WebResponse Classes
      4. Displaying Output As an HTML Page
      5. Utility Classes
      6. Lower-Level Protocols
      7. 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 8 Apps
      4. The Life Cycle of Applications
      5. Application Settings
      6. Webcam Capabilities
      7. Summary
  6. 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. Object Context
      5. Relationships
      6. Querying Data
      7. Writing Data to the Database
      8. Using POCO Objects
      9. Using the Code First Programming Model
      10. 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
  7. 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
      1. Overview
      2. Windows 8 Modern UI Design
      3. Sample Application Core Functionality
      4. App Bars
      5. Launching and Navigation
      6. Layout Changes
      7. Storage
      8. Pickers
      9. Sharing Contract
      10. Tiles
      11. Summary
    5. Chapter 39: 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. Membership and Roles
      9. Summary
    6. Chapter 40: 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
    7. Chapter 41: 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. ASP.NET Web API
      11. Summary
    8. Chapter 42: ASP.NET Dynamic Data
      1. Overview
      2. Creating Dynamic Data Web Applications
      3. Customizing Dynamic Data Websites
      4. Summary
  8. 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: WCF Data Services
      1. Overview
      2. Custom Hosting with CLR Objects
      3. HTTP Client Application
      4. Queries with URLs
      5. Using WCF Data Services with the ADO.NET Entity Framework
      6. 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
  9. Introduction
  10. Advertisements

Product information

  • Title: Professional C# 2012 and .NET 4.5
  • Author(s):
  • Release date: November 2012
  • Publisher(s): Wrox
  • ISBN: 9781118314425