|
C# 3.0 In A Nutshell 3rd Edition
This is a concise yet thorough reference to C# 3.0
programming as implemented in Microsoft's Visual Studio
2008. C# 3.0 in a Nutshell gets right to the point, covering
the essentials of language syntax and usage as well as the
parts of the .NET base class libraries you need to build
working applications. But unlike earlier
editions, this book
is now organized entirely around concepts and use cases,
providing greater depth and readability.
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
Designed as a handbook for daily use, C# 3.0 in a Nutshell
is an ideal companion to any of the vast array of books that
focus on an applied technology such as WPF, ASP.NET, or WCF.
The areas of the language and .NET Framework that such books
omit, this one covers in detail.
CONTENTS:
Chapter 1
Preface
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
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
3. Creating Types in C#
Classes
Inheritance
The object Type
Structs
Access Modifiers
Interfaces
Enums
\Nested Types
Generics
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
5. Framework Overview
The CLR and Core Framework
Applied Technologies
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
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
8. LINQ Queries
Getting Started
Lambda Queries
Comprehension Queries
Deferred Execution
Subqueries
Composition Strategies
Projection Strategies
Interpreted Queries
LINQ to SQL
Building Query Expressions
9. LINQ Operators
Overview
Filtering
Projecting
Joining
Ordering
Grouping
Set Operators
Conversion Methods
Element Operators
Aggregation Methods
Quantifiers
Generation Methods
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
11. Other XML Technologies
XmlReader
XmlWriter
Patterns for Using XmlReader/XmlWriter
XmlDocument
XPath
XSD and Schema Validation
XSLT
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
13. Streams and I/O
Stream Architecture
Using Streams
Stream Adapters
File and Directory Operations
Compression
Isolated Storage
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
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
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
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
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
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
20. Asynchronous Methods
Why Asynchronous Methods Exist
Asynchronous Method Signatures
Using Asynchronous Methods
Writing Asynchronous Methods
Fake Asynchronous Methods
Alternatives to Asynchronous Methods
Asynchronous Events
21. Application Domains
Application Domain Architecture
Creating and Destroying Application Domains
Using Multiple Application Domains
Using DoCallBack
Domains and Threads
Sharing Data Between Domains
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
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
24. Regular Expressions
Regular Expression Basics
Quantifiers
Zero-Width Assertions
Groups
Replacing and Splitting Text
Cookbook Regular Expressions
Regular Expressions Language Reference
A. C# Keywords
B. Namespace-to-Assembly Reference
Index
|