Book description
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
Publisher resources
Table of contents
- A Note Regarding Supplemental Files
- Preface
- 1. Introducing C# and the .NET Framework
-
2. C# Language Basics
- 2.1. A First C# Program
- 2.2. Syntax
- 2.3. Type Basics
- 2.4. Numeric Types
- 2.5. Boolean Type and Operators
- 2.6. Strings and Characters
- 2.7. Arrays
- 2.8. Variables and Parameters
- 2.9. Expressions and Operators
- 2.10. Statements
- 2.11. Namespaces
-
3. Creating Types in C#
- 3.1. Classes
- 3.2. Inheritance
- 3.3. The object Type
- 3.4. Structs
- 3.5. Access Modifiers
- 3.6. Interfaces
- 3.7. Enums
- 3.8. Nested Types
-
3.9. Generics
- 3.9.1. Generic Types
- 3.9.2. Why Generics Exist
- 3.9.3. Generic Methods
- 3.9.4. Declaring Generic Parameters
- 3.9.5. typeof and Generics
- 3.9.6. The default Generic Value
- 3.9.7. Generic Constraints
- 3.9.8. Generics and Covariance
- 3.9.9. Subclassing Generic Types
- 3.9.10. Self-Referencing Generic Declarations
- 3.9.11. Static Data
- 3.9.12. C# Generics Versus C++ Templates
-
4. Advanced C#
- 4.1. Delegates
- 4.2. Events
- 4.3. Lambda Expressions (C# 3.0)
- 4.4. Anonymous Methods
- 4.5. try Statements and Exceptions
- 4.6. Enumeration and Iterators
- 4.7. Nullable Types
- 4.8. Operator Overloading
- 4.9. Extension Methods (C# 3.0)
- 4.10. Anonymous Types (C# 3.0)
- 4.11. Attributes
- 4.12. Unsafe Code and Pointers
- 4.13. Preprocessor Directives
- 4.14. XML Documentation
-
5. Framework Overview
-
5.1. The CLR and Core Framework
- 5.1.1. System Types
- 5.1.2. Text Processing
- 5.1.3. Collections
- 5.1.4. Queries
- 5.1.5. XML
- 5.1.6. Streams and I/O
- 5.1.7. Networking
- 5.1.8. Serialization
- 5.1.9. Assemblies, Reflection, and Attributes
- 5.1.10. Security
- 5.1.11. Threading and Asynchronous Methods
- 5.1.12. Application Domains
- 5.1.13. Native Interoperability
- 5.1.14. Diagnostics
- 5.2. Applied Technologies
-
5.1. The CLR and Core Framework
-
6. Framework Fundamentals
- 6.1. String and Text Handling
- 6.2. Dates and Times
- 6.3. Dates and Time Zones
- 6.4. Formatting and Parsing
- 6.5. Standard Format Strings and Parsing Flags
- 6.6. Other Conversion Mechanisms
- 6.7. Working with Numbers
- 6.8. Enums
- 6.9. The Guid Struct
- 6.10. Equality Comparison
- 6.11. Order Comparison
- 6.12. Utility Classes
- 7. Collections
- 8. LINQ Queries
-
9. LINQ Operators
- 9.1. Overview
- 9.2. Filtering
- 9.3. Projecting
- 9.4. Joining
- 9.5. Ordering
- 9.6. Grouping
- 9.7. Set Operators
- 9.8. Conversion Methods
- 9.9. Element Operators
- 9.10. Aggregation Methods
- 9.11. Quantifiers
- 9.12. Generation Methods
- 10. LINQ to XML
- 11. Other XML Technologies
- 12. Disposal and Garbage Collection
-
13. Streams and I/O
- 13.1. Stream Architecture
- 13.2. Using Streams
- 13.3. Stream Adapters
- 13.4. File and Directory Operations
- 13.5. Compression
- 13.6. Isolated Storage
- 14. Networking
-
15. Serialization
- 15.1. Serialization Concepts
- 15.2. The Data Contract Serializer
- 15.3. Data Contracts and Collections
- 15.4. Extending Data Contracts
- 15.5. The Binary Serializer
- 15.6. Binary Serialization Attributes
- 15.7. Binary Serialization with ISerializable
- 15.8. XML Serialization
-
16. Assemblies
- 16.1. What’s in an Assembly
- 16.2. Signing an Assembly
- 16.3. Assembly Names
- 16.4. The Global Assembly Cache
- 16.5. Resources and Satellite Assemblies
- 16.6. Resolving and Loading Assemblies
- 16.7. Deploying Assemblies Outside the Base Folder
- 16.8. Packing a Single-File Executable
- 16.9. Working with Unreferenced Assemblies
-
17. Reflection and Metadata
- 17.1. Reflecting and Activating Types
-
17.2. Reflecting and Invoking Members
- 17.2.1. Member Types
- 17.2.2. C# Members Versus CLR Members
- 17.2.3. Generic Type Members
- 17.2.4. Dynamically Invoking a Member
- 17.2.5. Method Parameters
- 17.2.6. Using Delegates for Performance
- 17.2.7. Accessing Nonpublic Members
- 17.2.8. Generic Methods
- 17.2.9. Anonymously Calling Members of a Generic Type
- 17.3. Reflecting Assemblies
- 17.4. Working with Attributes
- 17.5. Dynamic Code Generation
- 17.6. Emitting Assemblies and Types
- 17.7. Emitting Type Members
- 17.8. Emitting Generic Methods and Types
- 17.9. Awkward Emission Targets
- 17.10. Parsing IL
-
18. Security
- 18.1. Permissions
- 18.2. Code Access Security
- 18.3. Running in a Sandbox
- 18.4. Sandboxing Another Assembly
- 18.5. Operating System Security
- 18.6. Identity and Role Security
- 18.7. Cryptography Overview
- 18.8. Windows Data Protection
- 18.9. Hashing
- 18.10. Symmetric Encryption
- 18.11. Public Key Encryption and Signing
-
19. Threading
- 19.1. Threading’s Uses and Misuses
- 19.2. Getting Started
- 19.3. Asynchronous Delegates
- 19.4. Synchronization
- 19.5. Locking
- 19.6. Thread Safety
- 19.7. Nonblocking Synchronization
- 19.8. Signaling with Event Wait Handles
- 19.9. Signaling with Wait and Pulse
- 19.10. Interrupt and Abort
- 19.11. Local Storage
- 19.12. BackgroundWorker
- 19.13. ReaderWriterLockSlim
- 19.14. Timers
- 20. Asynchronous Methods
- 21. Application Domains
- 22. Integrating with Native DLLs
- 23. Diagnostics
-
24. Regular Expressions
- 24.1. Regular Expression Basics
- 24.2. Quantifiers
- 24.3. Zero-Width Assertions
- 24.4. Groups
- 24.5. Replacing and Splitting Text
-
24.6. Cookbook Regular Expressions
-
24.6.1. Recipes
- 24.6.1.1. Matching U.S. Social Security number/phone number
- 24.6.1.2. Extracting “name = value” pairs (one per line)
- 24.6.1.3. Strong password validation
- 24.6.1.4. Lines of at least 80 characters
- 24.6.1.5. Parsing dates/times (N/N/N H:M:S AM/PM)
- 24.6.1.6. Matching Roman numerals
- 24.6.1.7. Removing repeated words
- 24.6.1.8. Word count
- 24.6.1.9. Matching a Guid
- 24.6.1.10. Parsing an XML tag
- 24.6.1.11. Splitting a camel-cased word
- 24.6.1.12. Obtaining a legal filename
- 24.6.1.13. Escaping Unicode characters for HTML
-
24.6.1. Recipes
- 24.7. Regular Expressions Language Reference
- A. C# Keywords
- B. Namespace-to-Assembly Reference
- About the Authors
- Colophon
- Copyright
Product information
- Title: C# 3.0 in a Nutshell, 3rd Edition
- Author(s):
- Release date: September 2007
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596527570
You might also like
book
C# 4.0 in a Nutshell, 4th Edition
What people are saying about C# 4.0 in a Nutshell "C# 4.0 in a Nutshell is …
book
C# 6.0 in a Nutshell, 6th Edition
When you have questions about C# 6.0 or the .NET CLR and its core Framework assemblies, …
book
C# 3.0 Design Patterns
If you want to speed up the development of your .NET applications, you're ready for C# …
book
C# 5.0 Unleashed
Buy the print and get the eBook version for free! See inside the book for access …