C# 3.0 in a Nutshell, 3rd Edition
A Desktop Quick Reference
Publisher: O'Reilly Media
Release Date: February 2009
Pages: 864
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
C# 3.0 introduces the most significant enhancements yet to the programming language, and C# 3.0 in a Nutshell delves deep into the subject while assuming minimal prior knowledge of C#-making it accessible to anyone with a reasonable background in programming. In addition to the language, the book covers the .NET CLR and the core Framework assemblies, along with the unified querying syntax called Language Integrated Query (LINQ), which bridges the traditional divide between programs and their data sources.
Free of clutter and long introductions, this book provides a map of C# 3.0 knowledge in a succinct and unified style:
- Opening chapters concentrate purely on C#, starting with the basics of syntax, types and variables, and finishing with advanced topics such as unsafe code and preprocessor directives
- Later chapters cover the core .NET 3.5 Framework, including such topics as LINQ, XML, collections, I/O and networking, memory management, reflection, attributes, security, threading, application domains and native interoperability
Table of Contents
-
Chapter 1 Introducing C# and the .NET Framework
-
Object Orientation
-
Type Safety
-
Memory Management
-
Platform Support
-
C#'s Relationship with the CLR
-
The CLR and .NET Framework
-
What's New in C# 3.0
-
-
Chapter 2 C# Language Basics
-
A First C# Program
-
Syntax
-
Type Basics
-
Numeric Types
-
Boolean Type and Operators
-
Strings and Characters
-
Arrays
-
Variables and Parameters
-
Expressions and Operators
-
Statements
-
Namespaces
-
-
Chapter 3 Creating Types in C#
-
Classes
-
Inheritance
-
The object Type
-
Structs
-
Access Modifiers
-
Interfaces
-
Enums
-
Nested Types
-
Generics
-
-
Chapter 4 Advanced C#
-
Delegates
-
Events
-
Lambda Expressions (C# 3.0)
-
Anonymous Methods
-
try Statements and Exceptions
-
Enumeration and Iterators
-
Nullable Types
-
Operator Overloading
-
Extension Methods (C# 3.0)
-
Anonymous Types (C# 3.0)
-
Attributes
-
Unsafe Code and Pointers
-
Preprocessor Directives
-
XML Documentation
-
-
Chapter 5 Framework Overview
-
The CLR and Core Framework
-
Applied Technologies
-
-
Chapter 6 Framework Fundamentals
-
String and Text Handling
-
Dates and Times
-
Dates and Time Zones
-
Formatting and Parsing
-
Standard Format Strings and Parsing Flags
-
Other Conversion Mechanisms
-
Working with Numbers
-
Enums
-
The Guid Struct
-
Equality Comparison
-
Order Comparison
-
Utility Classes
-
-
Chapter 7 Collections
-
Enumeration
-
The ICollection and IList Interfaces
-
The Array Class
-
Lists, Queues, Stacks, and Sets
-
Dictionaries
-
Customizable Collections and Proxies
-
Plugging in Equality and Order
-
-
Chapter 8 LINQ Queries
-
Getting Started
-
Lambda Queries
-
Comprehension Queries
-
Deferred Execution
-
Subqueries
-
Composition Strategies
-
Projection Strategies
-
Interpreted Queries
-
LINQ to SQL
-
Building Query Expressions
-
-
Chapter 9 LINQ Operators
-
Overview
-
Filtering
-
Projecting
-
Joining
-
Ordering
-
Grouping
-
Set Operators
-
Conversion Methods
-
Element Operators
-
Aggregation Methods
-
Quantifiers
-
Generation Methods
-
-
Chapter 10 LINQ to XML
-
Architectural Overview
-
X-DOM Overview
-
Instantiating an X-DOM
-
Navigating and Querying
-
Updating an X-DOM
-
Working with Values
-
Documents and Declarations
-
Names and Namespaces
-
Annotations
-
Projecting into an X-DOM
-
-
Chapter 11 Other XML Technologies
-
XmlReader
-
XmlWriter
-
Patterns for Using XmlReader/XmlWriter
-
XmlDocument
-
XPath
-
XSD and Schema Validation
-
XSLT
-
-
Chapter 12 Disposal and Garbage Collection
-
IDisposable, Dispose, and Close
-
Garbage Collection and Finalizers
-
Calling Dispose from a Finalizer
-
How the Garbage Collector Works
-
Alternatives to Garbage Collection
-
-
Chapter 13 Streams and I/O
-
Stream Architecture
-
Using Streams
-
Stream Adapters
-
File and Directory Operations
-
Compression
-
Isolated Storage
-
-
Chapter 14 Networking
-
Network Architecture
-
Addresses and Ports
-
URIs
-
Request/Response Architecture
-
HTTP-Specific Support
-
Writing an HTTP Server
-
Using FTP
-
Using DNS
-
Sending Mail with SmtpClient
-
Using TCP
-
Receiving POP3 Mail with TCP
-
-
Chapter 15 Serialization
-
Serialization Concepts
-
The Data Contract Serializer
-
Data Contracts and Collections
-
Extending Data Contracts
-
The Binary Serializer
-
Binary Serialization Attributes
-
Binary Serialization with ISerializable
-
XML Serialization
-
-
Chapter 16 Assemblies
-
What's in an Assembly
-
Signing an Assembly
-
Assembly Names
-
The Global Assembly Cache
-
Resources and Satellite Assemblies
-
Resolving and Loading Assemblies
-
Deploying Assemblies Outside the Base Folder
-
Packing a Single-File Executable
-
Working with Unreferenced Assemblies
-
-
Chapter 17 Reflection and Metadata
-
Reflecting and Activating Types
-
Reflecting and Invoking Members
-
Reflecting Assemblies
-
Working with Attributes
-
Dynamic Code Generation
-
Emitting Assemblies and Types
-
Emitting Type Members
-
Emitting Generic Methods and Types
-
Awkward Emission Targets
-
Parsing IL
-
-
Chapter 18 Security
-
Permissions
-
Code Access Security
-
Running in a Sandbox
-
Sandboxing Another Assembly
-
Operating System Security
-
Identity and Role Security
-
Cryptography Overview
-
Windows Data Protection
-
Hashing
-
Symmetric Encryption
-
Public Key Encryption and Signing
-
-
Chapter 19 Threading
-
Threading's Uses and Misuses
-
Getting Started
-
Asynchronous Delegates
-
Synchronization
-
Locking
-
Thread Safety
-
Nonblocking Synchronization
-
Signaling with Event Wait Handles
-
Signaling with Wait and Pulse
-
Interrupt and Abort
-
Local Storage
-
BackgroundWorker
-
ReaderWriterLockSlim
-
Timers
-
-
Chapter 20 Asynchronous Methods
-
Why Asynchronous Methods Exist
-
Asynchronous Method Signatures
-
Asynchronous Methods Versus Asynchronous Delegates
-
Using Asynchronous Methods
-
Writing Asynchronous Methods
-
Fake Asynchronous Methods
-
Alternatives to Asynchronous Methods
-
Asynchronous Events
-
-
Chapter 21 Application Domains
-
Application Domain Architecture
-
Creating and Destroying Application Domains
-
Using Multiple Application Domains
-
Using DoCallBack
-
Domains and Threads
-
Sharing Data Between Domains
-
-
Chapter 22 Integrating with Native DLLs
-
Calling into DLLs
-
Marshaling Common Types
-
Marshaling Classes and Structs
-
In and Out Marshaling
-
Callbacks from Unmanaged Code
-
Simulating a C Union
-
Shared Memory
-
Mapping a Struct to Unmanaged Memory
-
Interop Attribute Reference
-
-
Chapter 23 Diagnostics
-
Conditional Compilation
-
Debug and Trace Classes
-
Debugger Integration
-
Processes and Process Threads
-
StackTrace and StackFrame
-
Windows Event Logs
-
Performance Counters
-
The Stopwatch Class
-
-
Chapter 24 Regular Expressions
-
Regular Expression Basics
-
Quantifiers
-
Zero-Width Assertions
-
Groups
-
Replacing and Splitting Text
-
Cookbook Regular Expressions
-
Regular Expressions Language Reference
-
-
Appendix A C# Keywords
-
Appendix B Namespace-to-Assembly Reference
-
Colophon