Book description
The unique, visual format of Illustrated C# 2008 has been specially created by author, and teacher of development methods, Daniel Solis. The concise text, use of tables to clarify language features, frequent figures and diagrams, as well as focused code samples all combine to create a unique approach that will help you understand and get to work with C# fast.
It was while teaching numerous seminars on various programming languages that the author realized the immense power diagrams have in explaining programming language concepts. Most people learn quicker and retain information better when the material is presented in a clean, simple, visual format. To achieve this result in his book, Solis uses concise text and bulleted lists, tables to clarify and summarize language features, as well as his renowned, ubiquitous figures and diagrams. Each language feature is illustrated with a concise and focused code sample for complete clarity.
Following an overview of the .NET platform and the role played by C#, you'll soon move into exploring the C# language in its entirety, including all the new C# 2008 features right down to the most complex topics involved in C#. If you're a C++ or VB programmer migrating to C# 2008, this book will be invaluable; the unique visual approach offers a far from lightweight treatment of C# 2008, so even the most experienced programmers will come away with a deeper understanding of the C# language.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
1. C# and the .NET Framework
- 1.1. Before .NET
- 1.2. Enter Microsoft .NET
- 1.3. Compiling to the Common Intermediate Language (CIL)
- 1.4. Compiling to Native Code and Execution
- 1.5. The Common Language Runtime (CLR)
- 1.6. The Common Language Infrastructure (CLI)
- 1.7. Review of the Acronyms
-
2. Overview of C# Programming
- 2.1. A Simple C# Program
- 2.2. More About SimpleProgram
- 2.3. Identifiers and Keywords
- 2.4. Naming Conventions
- 2.5. Keywords
- 2.6. Main: The Starting Point of a Program
- 2.7. Whitespace
- 2.8. Statements
- 2.9. Simple Statements
- 2.10. Blocks
- 2.11. Text Output from a Program
- 2.12. Write
- 2.13. WriteLine
- 2.14. The Format String
- 2.15. Multiple Markers and Values
- 2.16. Comments: Annotating the Code
- 2.17. More About Comments
- 2.18. Documentation Comments
- 2.19. Summary of Comment Types
- 3. Types, Storage, and Variables
-
4. Classes: The Basics
- 4.1. Overview of Classes
- 4.2. Programs and Classes: A Quick Example
- 4.3. Declaring a Class
- 4.4. Class Members
- 4.5. Creating Variables and Instances of a Class
- 4.6. Allocating Memory for the Data
- 4.7. Instance Members
- 4.8. Access Modifiers
- 4.9. Accessing Members from Inside the Class
- 4.10. Accessing Members from Outside the Class
- 4.11. Putting It All Together
-
5. Methods
- 5.1. The Structure of a Method
- 5.2. Local Variables
- 5.3. Local Constants
- 5.4. Method Invocations
- 5.5. Return Values
- 5.6. Parameters
- 5.7. Value Parameters
- 5.8. Reference Parameters
- 5.9. Output Parameters
- 5.10. Parameter Arrays
- 5.11. Summary of Parameter Types
- 5.12. Stack Frames
- 5.13. Recursion
- 5.14. Method Overloading
-
6. More About Classes
- 6.1. Class Members
- 6.2. Instance Class Members
- 6.3. Static Fields
- 6.4. Accessing Static Members from Outside the Class
- 6.5. Static Function Members
- 6.6. Other Static Class Member Types
- 6.7. Member Constants
-
6.8. Properties
- 6.8.1. Property Declarations and Accessors
- 6.8.2. A Property Example
- 6.8.3. Using a Property
- 6.8.4. Properties and Associated Fields
- 6.8.5. Performing Other Calculations
- 6.8.6. Read-Only and Write-Only Properties
- 6.8.7. An Example of a Computed, Read-Only Property
- 6.8.8. Example of Properties and Databases
- 6.8.9. Automatically Implemented Properties
- 6.8.10. Static Properties
- 6.9. Instance Constructors
- 6.10. Static Constructors
- 6.11. Object Initializers
- 6.12. Destructors
- 6.13. Comparing Constructors and Destructors
- 6.14. The readonly Modifier
- 6.15. The this Keyword
- 6.16. Indexers
- 6.17. Access Modifiers on Accessors
- 6.18. Partial Classes and Partial Types
-
7. Classes and Inheritance
- 7.1. Class Inheritance
- 7.2. Accessing the Inherited Members
- 7.3. Hiding Members of a Base Class
- 7.4. Base Access
- 7.5. Using References to a Base Class
- 7.6. Constructor Execution
- 7.7. Inheritance Between Assemblies
- 7.8. Member Access Modifiers
- 7.9. Abstract Members
- 7.10. Abstract Classes
- 7.11. Sealed Classes
- 7.12. Static Classes
- 7.13. Extension Methods
- 7.14. External Methods
-
8. Expressions and Operators
- 8.1. Expressions
- 8.2. Literals
- 8.3. Integer Literals
- 8.4. Character Literals
- 8.5. String Literals
- 8.6. Order of Evaluation
- 8.7. Simple Arithmetic Operators
- 8.8. The Remainder Operator
- 8.9. Relational and Equality Comparison Operators
- 8.10. Increment and Decrement Operators
- 8.11. Conditional Logical Operators
- 8.12. Logical Operators
- 8.13. Shift Operators
- 8.14. Assignment Operators
- 8.15. The Conditional Operator
- 8.16. Unary Arithmetic Operators
- 8.17. User-Defined Type Conversions
- 8.18. Operator Overloading
- 8.19. The typeof Operator
-
9. Statements
- 9.1. What Are Statements?
- 9.2. Expression Statements
- 9.3. Flow-of-Control Statements
- 9.4. The if Statement
- 9.5. The if . . . else Statement
- 9.6. The switch Statement
- 9.7. The while Loop
- 9.8. The do Loop
- 9.9. The for Loop
- 9.10. Jump Statements
- 9.11. The break Statement
- 9.12. The continue Statement
- 9.13. Labeled Statements
- 9.14. The goto Statement
- 9.15. The using Statement
- 9.16. Other Statements
-
10. Namespaces and Assemblies
- 10.1. Referencing Other Assemblies
- 10.2. Namespaces
- 10.3. The using Directives
- 10.4. The Structure of an Assembly
- 10.5. The Identity of an Assembly
- 10.6. Strongly Named Assemblies
- 10.7. Private Deployment of an Assembly
- 10.8. Shared Assemblies and the GAC
- 10.9. Configuration Files
- 10.10. Delayed Signing
-
11. Exceptions
- 11.1. What Are Exceptions?
- 11.2. The try Statement
- 11.3. The Exception Classes
- 11.4. The catch Clause
- 11.5. Examples Using Specific catch Clauses
- 11.6. The catch Clauses Section
- 11.7. The finally Block
- 11.8. Finding a Handler for an Exception
- 11.9. Searching Further
- 11.10. Throwing Exceptions
- 11.11. Throwing Without an Exception Object
- 12. Structs
- 13. Enumerations
-
14. Arrays
- 14.1. Arrays
- 14.2. Types of Arrays
- 14.3. An Array As an Object
- 14.4. One-Dimensional and Rectangular Arrays
- 14.5. Instantiating a One-Dimensional or Rectangular Array
- 14.6. Accessing Array Elements
- 14.7. Initializing an Array
- 14.8. Jagged Arrays
- 14.9. Comparing Rectangular and Jagged Arrays
- 14.10. The foreach Statement
- 14.11. Array Covariance
- 14.12. Useful Inherited Array Members
- 14.13. Comparing Array Types
-
15. Delegates
- 15.1. What Is a Delegate?
- 15.2. Declaring the Delegate Type
- 15.3. Creating the Delegate Object
- 15.4. Assigning Delegates
- 15.5. Combining Delegates
- 15.6. Adding Methods to Delegates
- 15.7. Removing Methods from a Delegate
- 15.8. Invoking a Delegate
- 15.9. Delegate Example
- 15.10. Invoking Delegates with Return Values
- 15.11. Invoking Delegates with Reference Parameters
- 15.12. Anonymous Methods
- 15.13. Lambda Expressions
- 16. Events
-
17. Interfaces
- 17.1. What Is an Interface?
- 17.2. Declaring an Interface
- 17.3. Implementing an Interface
- 17.4. An Interface Is a Reference Type
- 17.5. Using the as Operator with Interfaces
- 17.6. Implementing Multiple Interfaces
- 17.7. Implementing Interfaces with Duplicate Members
- 17.8. References to Multiple Interfaces
- 17.9. An Inherited Member As an Implementation
- 17.10. Explicit Interface Member Implementations
- 17.11. Interfaces Can Inherit Interfaces
-
18. Conversions
- 18.1. What Are Conversions?
- 18.2. Implicit Conversions
- 18.3. Explicit Conversions and Casting
- 18.4. Types of Conversions
- 18.5. Numeric Conversions
- 18.6. Reference Conversions
- 18.7. Boxing Conversions
- 18.8. Unboxing Conversions
- 18.9. User-Defined Conversions
- 18.10. The is Operator
- 18.11. The as Operator
-
19. Generics
- 19.1. What Are Generics?
- 19.2. Generics in C#
- 19.3. Generic Classes
- 19.4. Declaring a Generic Class
- 19.5. Creating a Constructed Type
- 19.6. Creating Variables and Instances
- 19.7. Constraints on Type Parameters
- 19.8. Generic Structs
- 19.9. Generic Interfaces
- 19.10. Generic Delegates
- 19.11. Generic Methods
- 19.12. Extension Methods with Generic Classes
-
20. Enumerators and Iterators
- 20.1. Enumerators and Enumerable Types
- 20.2. Using the IEnumerator Interface
- 20.3. The IEnumerable Interface
- 20.4. The Non-Interface Enumerator
- 20.5. The Generic Enumeration Interfaces
- 20.6. The IEnumerator<T> Interface
- 20.7. The IEnumerable<T> Interface
- 20.8. Iterators
- 20.9. Common Iterator Patterns
- 20.10. Producing Enumerables and Enumerators
- 20.11. Producing Multiple Enumerables
- 20.12. Producing Multiple Enumerators
- 20.13. Behind the Scenes with Iterators
-
21. Introduction to LINQ
- 21.1. What Is LINQ?
- 21.2. LINQ Providers
- 21.3. Query Syntax and Method Syntax
- 21.4. Query Variables
- 21.5. The Structure of Query Expressions
- 21.6. The Standard Query Operators
- 21.7. LINQ to XML
- 22. Introduction to Asynchronous Programming
- 23. Preprocessor Directives
-
24. Reflection and Attributes
- 24.1. Metadata and Reflection
- 24.2. The Type Class
- 24.3. Getting a Type Object
- 24.4. What Is an Attribute?
- 24.5. Applying an Attribute
- 24.6. Predefined, Reserved Attributes
- 24.7. More About Applying Attributes
- 24.8. Custom Attributes
- 24.9. Accessing an Attribute
- 25. Other Topics
Product information
- Title: Illustrated C# 2008
- Author(s):
- Release date: February 2008
- Publisher(s): Apress
- ISBN: 9781590599549
You might also like
book
Professional C# 2005
Professional C# 2005 prepares you to program in C#, and it provides the necessary background information …
book
Illustrated C# 2012
This book presents the C# 5.0 language in a uniquely succinct and visual format. Often in …
book
Illustrated C# 2010
This book presents the C# language in a uniquely succinct and visual format. Often in programming …
book
Special Edition Using C#
Visual C#.NET is a completely new language engineered by Microsoft to encompass the strengths and fix …