Book description
This new edition of Pro C# 5.0 and the .NET 4.5 Platform has been completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET Framework. You'll find new chapters covering all the important new features that make .NET 4.5 the most comprehensive release yet, including:
.NET APIs for Metro-style apps
An improved Managed Extesibility Framework (MEF)
New asynchronous task-based model for async operations
How HTML5 support is being wrapped into C# web applications
New programming interfaces for HTTP applications, including improved IPv6 support
Expanded WPF, WCF and WF libraries giving C# more power than ever before
This comes on top of award winning coverage of core C# features, both old and new, that have made the previous editions of this book so popular (you'll find everything from generics to pLINQ covered here).
The mission of this text is to provide you with a rock–solid foundation in the C# programming language and the core aspects of the .NET platform (assemblies, remoting, Windows Forms, Web Forms, Metro, ADO.NET, XML web services, etc.). Once you digest the information presented in these 25 chapters, you'll be in a perfect position to apply this knowledge to your specific programming assignments, and you'll be well equipped to explore the .NET universe on your own terms.
What you'll learn
Be the first to understand the .NET 4.5 platform and Visual C# 2012.
Discover the ins and outs of the leading .NET technology.
Learn from an award-winning author who has been teaching the .NET world since version 1.0.
Find complete coverage of the XAML, .NET 4.5 and Visual Studio 12 together with discussion of Metro programming and the new Windows Runtime.
Who this book is for
If you're checking out this book for the first time, do understand that it's targeted at experienced software professionals or graduate students of computer science (so don't expect three chapters on iteration or decision constructs!).
It is perfect for anyone who is interested in the new .NET Framework 4.5 and the C# language. Whether you are moving to .NET for the first time or are already writing applications using previous .NET versions, this book will provide you with a comprehensive grounding in the new technology and serve as a complete reference throughout your coding career.
Table of contents
- Title
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
Part I: Introducing C# and .NET Platform
-
Chapter 1: The Philosophy of .NET
- An Initial Look at the .NET Platform
- Introducing the Building Blocks of the .NET Platform (the CLR, CTS, and CLS)
- Additional .NET-Aware Programming Languages
- An Overview of .NET Assemblies
- Understanding the Common Type System
- Understanding the Common Language Specification
- Understanding the Common Language Runtime
- The Assembly/Namespace/Type Distinction
- Exploring an Assembly Using ildasm.exe
- The Platform-Independent Nature of .NET
- A Brief Word Regarding Windows 8 Metro-Style Applications
- Summary
- Chapter 2: Building C# Applications
-
Chapter 1: The Philosophy of .NET
-
Part II: Core C# Programming
-
Chapter 3: Core C# Programming Constructs, Part I
- The Anatomy of a Simple C# Program
- An Interesting Aside: Some Additional Members of the System.Environment Class
- The System.Console Class
- System Data Types and Corresponding C# Keywords
- Working with String Data
- Narrowing and Widening Data Type Conversions
- Understanding Implicitly Typed Local Variables
- C# Iteration Constructs
- Decision Constructs and the Relational/Equality Operators
- Summary
- Chapter 4: Core C# Programming Constructs, Part II
-
Chapter 3: Core C# Programming Constructs, Part I
-
Part III: Object-Oriented Programming with C#
-
Chapter 5: Understanding Encapsulation
- Introducing the C# Class Type
- Understanding Constructors
- The Role of the this Keyword
- Understanding the static Keyword
- Defining the Pillars of OOP
- C# Access Modifiers
- The First Pillar: C#’s Encapsulation Services
- Understanding Automatic Properties
- Understanding Object Initialization Syntax
- Working with Constant Field Data
- Understanding Partial Types
- Summary
-
Chapter 6: Understanding Inheritance and Polymorphism
- The Basic Mechanics of Inheritance
- Revising Visual Studio Class Diagrams
- The Second Pillar of OOP: The Details of Inheritance
- Programming for Containment/Delegation
- The Third Pillar of OOP: C#’s Polymorphic Support
- Understanding Base Class/Derived Class Casting Rules
- The Master Parent Class: System.Object
- Testing Your Modified Person Class
- Summary
-
Chapter 7: Understanding Structured Exception Handling
- Ode to Errors, Bugs, and Exceptions
- The Role of .NET Exception Handling
- The Simplest Possible Example
- Configuring the State of an Exception
- System-Level Exceptions (System.SystemException)
- Application-Level Exceptions (System.ApplicationException)
- Processing Multiple Exceptions
- Who Is Throwing What?
- The Result of Unhandled Exceptions
- Debugging Unhandled Exceptions Using Visual Studio
- Summary
-
Chapter 8: Working with Interfaces
- Understanding Interface Types
- Defining Custom Interfaces
- Implementing an Interface
- Invoking Interface Members at the Object Level
- Interfaces As Parameters
- Interfaces As Return Values
- Arrays of Interface Types
- Implementing Interfaces Using Visual Studio
- Explicit Interface Implementation
- Designing Interface Hierarchies
- The IEnumerable and IEnumerator Interfaces
- The ICloneable Interface
- The IComparable Interface
- Summary
-
Chapter 5: Understanding Encapsulation
-
Part IV: Advanced C# Programming
-
Chapter 9: Collections and Generics
- The Motivation for Collection Classes
- The Problems of Nongeneric Collections
- The Role of Generic Type Parameters
- The System.Collections.Generic Namespace
- The System.Collections.ObjectModel Namespace
- Creating Custom Generic Methods
- Creating Custom Generic Structures and Classes
- Constraining Type Parameters
- Summary
- Chapter 10: Delegates, Events, and Lambda Expressions
- Chapter 11: Advanced C# Language Features
- Chapter 12: LINQ to Objects
-
Chapter 13: Understanding Object Lifetime
- Classes, Objects, and References
- The Basics of Object Lifetime
- The Role of Application Roots
- Understanding Object Generations
- Concurrent Garbage Collection Under .NET 1.0–3.5
- Background Garbage Collection Under .NET 4.0 and Greater
- The System.GC Type
- Building Finalizable Objects
- Building Disposable Objects
- Building Finalizable and Disposable Types
- Understanding Lazy Object Instantiation
- Summary
-
Chapter 9: Collections and Generics
-
Part V: Programming with .NET Assemblies
-
Chapter 14: Building and Configuring Class Libraries
- Defining Custom Namespaces
- The Role of .NET Assemblies
- Understanding the Format of a .NET Assembly
- Building and Consuming Custom Class Library
- Understanding Private Assemblies
- Understanding Shared Assemblies
- Consuming a Shared Assembly
- Configuring Shared Assemblies
- Understanding Publisher Policy Assemblies
- Understanding the <codeBase> Element
- The System.Configuration Namespace
- The Configuration File Schema Documentation
- Summary
-
Chapter 15: Type Reflection, Late Binding, and Attribute-Based Programming
- The Necessity of Type Metadata
- Understanding Reflection
- Building a Custom Metadata Viewer
- Dynamically Loading Assemblies
- Reflecting on Shared Assemblies
- Understanding Late Binding
- Understanding the Role of .NET Attributes
- Building Custom Attributes
- Assembly-Level Attributes
- Reflecting on Attributes Using Early Binding
- Reflecting on Attributes Using Late Binding
- Putting Reflection, Late Binding, and Custom Attributes in Perspective
- Building an Extendable Application
- Summary
- Chapter 16: Dynamic Types and the Dynamic Language Runtime
- Chapter 17: Processes, AppDomains, and Object Contexts
-
Chapter 18: Understanding CIL and the Role of Dynamic Assemblies
- Reasons for Learning the Grammar of CIL
- Examining CIL Directives, Attributes, and Opcodes
- Pushing and Popping: The Stack-Based Nature of CIL
- Understanding Round-Trip Engineering
- Understanding CIL Directives and Attributes
- .NET Base Class Library, C#, and CIL Data Type Mappings
- Defining Type Members in CIL
- Examining CIL Opcodes
- Building a .NET Assembly with CIL
- Understanding Dynamic Assemblies
- Summary
-
Chapter 14: Building and Configuring Class Libraries
-
Part VI: Introducing the .NET Base Class Libraries
-
Chapter 19: Multithreaded, Parallel, and Async Programming
- The Process/AppDomain/Context/Thread Relationship
- A Brief Review of the .NET Delegate
- The Asynchronous Nature of Delegates
- Invoking a Method Asynchronously
- The System.Threading Namespace
- The System.Threading.Thread Class
- Manually Creating Secondary Threads
- The Issue of Concurrency
- Programming with Timer Callbacks
- Understanding the CLR ThreadPool
- Parallel Programming Using the Task Parallel Library
- Parallel LINQ Queries (PLINQ)
- Asynchronous Calls Under .NET 4.5
- Summary
-
Chapter 20: File I/O and Object Serialization
- Exploring the System.IO Namespace
- The Directory(Info) and File(Info) Types
- Working with the DirectoryInfo Type
- Working with the Directory Type
- Working with the DriveInfo Class Type
- Working with the FileInfo Class
- Working with the File Type
- The Abstract Stream Class
- Working with StreamWriters and StreamReaders
- Working with StringWriters and StringReaders
- Working with BinaryWriters and BinaryReaders
- Watching Files Programmatically
- Understanding Object Serialization
- Configuring Objects for Serialization
- Choosing a Serialization Formatter
- Serializing Objects Using the BinaryFormatter
- Serializing Objects Using the SoapFormatter
- Serializing Objects Using the XmlSerializer
- Serializing Collections of Objects
- Customizing the Soap/Binary Serialization Process
- Summary
-
Chapter 21: ADO.NET Part I: The Connected Layer
- A High-Level Definition of ADO.NET
- Understanding ADO.NET Data Providers
- Additional ADO.NET Namespaces
- The Types of the System.Data Namespace
- Abstracting Data Providers Using Interfaces
- Creating the AutoLot Database
- The ADO.NET Data Provider Factory Model
- Understanding the Connected Layer of ADO.NET
- Working with Data Readers
- Building a Reusable Data Access Library
- Creating a Console UI–Based Front End
- Understanding Database Transactions
- Summary
-
Chapter 22: ADO.NET Part II: The Disconnected Layer
- Understanding the Disconnected Layer of ADO.NET
- Understanding the Role of the DataSet
- Working with DataColumns
- Working with DataRows
- Working with DataTables
- Binding DataTable Objects to Windows Forms GUIs
- Working with Data Adapters
- Adding Disconnection Functionality to AutoLotDAL.dll
- Multitabled DataSet Objects and Data Relationships
- The Windows Forms Database Designer Tools
- Isolating Strongly Typed Database Code into a Class Library
- Programming with LINQ to DataSet
- Summary
- Chapter 23: ADO.NET Part III: The Entity Framework
- Chapter 24: Introducing LINQ to XML
-
Chapter 25: Introducing Windows Communication Foundation
- A Potpourri of Distributed Computing APIs
- The Role of WCF
- Investigating the Core WCF Assemblies
- The Visual Studio WCF Project Templates
- The Basic Composition of a WCF Application
- The ABCs of WCF
- Building a WCF Service
- Hosting the WCF Service
- Building the WCF Client Application
- Simplifying Configuration Settings
- Using the WCF Service Library Project Template
- Hosting the WCF Service Within a Windows Service
- Invoking a Service Asynchronously from the Client
- Designing WCF Data Contracts
- Summary
- Chapter 26: Introducing Windows Workflow Foundation
-
Chapter 19: Multithreaded, Parallel, and Async Programming
-
Part VII: Windows Presentation Foundation
-
Chapter 27: Introducing Windows Presentation Foundation and XAML
- The Motivation Behind WPF
- The Various Flavors of WPF
- Investigating the WPF Assemblies
- Building a WPF Application Without XAML
- Building a WPF Application Using Only XAML
- Transforming Markup into a .NET Assembly
- Understanding the Syntax of WPF XAML
- Building a WPF Application Using Code-Behind Files
- Building WPF Applications Using Visual Studio
- Building a Custom XAML Editor with Visual Studio
- Summary
-
Chapter 28: Programming with WPF Controls
- A Survey of the Core WPF Controls
- A Brief Review of the Visual Studio WPF Designer
- Controlling Content Layout Using Panels
- Building a Window’s Frame Using Nested Panels
- Understanding WPF Commands
- A Deeper Look at WPF APIs and Controls
- Building the Ink API Tab
- Introducing the Documents API
- Building the Documents Tab
- Introducing the WPF Data-Binding Model
- Summary
-
Chapter 29: WPF Graphics Rendering Services
- Understanding WPF’s Graphical Rendering Services
- Rendering Graphical Data Using Shapes
- WPF Brushes and Pens
- Applying Graphical Transformations
- Working with the Visual Studio Transform Editor
- Rendering Graphical Data Using Drawings and Geometries
- The Role of Expression Design
- Rendering Graphical Data Using the Visual Layer
- Summary
- Chapter 30: WPF Resources, Animations, and Styles
- Chapter 31: Dependency Properties, Routed Events, and Templates
-
Chapter 27: Introducing Windows Presentation Foundation and XAML
-
Part VIII: ASP.NET Web Forms
-
Chapter 32: Introducing ASP.NET Web Forms
- The Role of HTTP
- Understanding Web Applications and Web Servers
- The Role of HTML
- The Role of Client-Side Scripting
- Posting Back to the Web Server
- An Overview of the ASP.NET API
- Building a Single-File ASP.NET Web Page
- Building an ASP.NET Web Page Using Code Files
- ASP.NET Web Sites vs. ASP.NET Web Applications
- The ASP.NET Web Site Directory Structure
- The Inheritance Chain of the Page Type
- Interacting with the Incoming HTTP Request
- Interacting with the Outgoing HTTP Response
- The Life Cycle of an ASP.NET Web Page
- The Role of the web.config File
- Summary
- Chapter 33: ASP.NET Web Controls, Master Pages, and Themes
-
Chapter 34: ASP.NET State Management Techniques
- The Issue of State
- ASP.NET State Management Techniques
- Understanding the Role of ASP.NET View State
- The Role of the Global.asax File
- Understanding the Application/Session Distinction
- Working with the Application Cache
- Maintaining Session Data
- Understanding Cookies
- The Role of the <sessionState> Element
- Introducing the ASP.NET Profile API
- Summary
-
Chapter 32: Introducing ASP.NET Web Forms
- Index
Product information
- Title: Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition
- Author(s):
- Release date: August 2012
- Publisher(s): Apress
- ISBN: 9781430242338
You might also like
book
C# 6.0 and the .NET 4.6 Framework, Seventh Edition
This new 7th edition of Pro C# 6.0 and the .NET 4.6 Platform has been completely …
book
Professional C# 2012 and .NET 4.5
Intermediate to advanced technique coverage, updated for C# 2012 and .NET 4.5 This guide is geared …
book
Pro C# 2010 and the .NET 4 Platform, Fifth Edition
The first edition of this book was released at the 2001 Tech-Ed conference in Atlanta, Georgia. …
book
Professional C# 5.0 and .NET 4.5.1
Comprehensive, advanced coverage of C# 5.0 and .NET 4.5.1 Whether you're a C# guru or transitioning …