Book description
This book presents the C# language in a uniquely succinct and visual format. Often in programming books, the information can be hidden in a vast sea of words. As a programmer who has over the years used a dozen programming languages, the author understands it can sometimes be difficult to slog through another 1,000-page book of dense text to learn a new language. There are likely many other programmers who feel the same way. To address this situation, this book explains C# using figures; short, focused code samples; and clear, concise explanations.
Figures are of prime importance in this book. While teaching programming seminars, Daniel Solis found that he could almost watch the lightbulbs going on over the students' heads as he drew the figures on the whiteboard. In this text, he has distilled each important concept into simple but accurate illustrations. The visual presentation of the content will give you an understanding of C# that's not possible with text alone.
For something as intricate and precise as a programming language, however, there must be text as well as figures. But rather than long, wordy explanations, Solis has used short, concise descriptions and bulleted lists to make each important piece of information visually distinct.
By the end of this book, you'll have a thorough working knowledge of all aspects of the C# language, whether you're a novice programmer or a seasoned veteran of other languages. If you want a long, leisurely, verbose explanation of the language, this is not the book for you. But if you want a concise, thorough, visual presentation of C#, this is just what you're looking for.
Table of contents
- Title Page
- Dedication
- Contents at a Glance
- Contents
- About the Author
- Acknowledgments
- Introduction
- CHAPTER 1: C# and the .NET Framework
-
CHAPTER 2: Overview of C# Programming
- A Simple C# Program
- More About SimpleProgram
- Identifiers and Keywords
- Naming Conventions
- Keywords
- Main: The Starting Point of a Program
- Whitespace
- Statements
- Simple Statements
- Blocks
- Text Output from a Program
- Write
- WriteLine
- The Format String
- Multiple Markers and Values
- Comments: Annotating the Code
- More About Comments
- Documentation Comments
- Summary of Comment Types
- CHAPTER 3: Types, Storage, and Variables
-
CHAPTER 4: Classes: The Basics
- Overview of Classes
- Programs and Classes: A Quick Example
- Declaring a Class
- Class Members
- Creating Variables and Instances of a Class
- Allocating Memory for the Data
- Instance Members
- Access Modifiers
- Accessing Members from Inside the Class
- Accessing Members from Outside the Class
- Putting It All Together
- CHAPTER 5: Methods
-
CHAPTER 6: More About Classes
- Class Members
- Instance Class Members
- Static Fields
- Accessing Static Members from Outside the Class
- Static Function Members
- Other Static Class Member Types
- Member Constants
- Properties
- Instance Constructors
- Static Constructors
- Object Initializers
- Destructors
- Comparing Constructors and Destructors
- The readonly Modifier
- The this Keyword
- Indexers
- Access Modifiers on Accessors
- Partial Classes and Partial Types
- CHAPTER 7: Classes and Inheritance
-
CHAPTER 8: Expressions and Operators
- Expressions
- Literals
- Integer Literals
- Character Literals
- String Literals
- Order of Evaluation
- Simple Arithmetic Operators
- The Remainder Operator
- Relational and Equality Comparison Operators
- Increment and Decrement Operators
- Conditional Logical Operators
- Logical Operators
- Shift Operators
- Assignment Operators
- The Conditional Operator
- Unary Arithmetic Operators
- User-Defined Type Conversions
- Operator Overloading
- The typeof Operator
- Other Operators
-
CHAPTER 9: Statements
- What Are Statements?
- Expression Statements
- Flow-of-Control Statements
- The if Statement
- The if . . . else Statement
- The switch Statement
- The while Loop
- The do Loop
- The for Loop
- Jump Statements
- The break Statement
- The continue Statement
- Labeled Statements
- The goto Statement
- The using Statement
- Other Statements
- CHAPTER 10: Namespaces and Assemblies
- CHAPTER 11: Exceptions
- CHAPTER 12: Structs
- CHAPTER 13: Enumerations
-
CHAPTER 14: Arrays
- Arrays
- Types of Arrays
- An Array As an Object
- One-Dimensional and Rectangular Arrays
- Instantiating a One-Dimensional or Rectangular Array
- Accessing Array Elements
- Initializing an Array
- Jagged Arrays
- Comparing Rectangular and Jagged Arrays
- The foreach Statement
- Array Covariance
- Useful Inherited Array Members
- Comparing Array Types
-
CHAPTER 15: Delegates
- What Is a Delegate?
- Declaring the Delegate Type
- Creating the Delegate Object
- Assigning Delegates
- Combining Delegates
- Adding Methods to Delegates
- Removing Methods from a Delegate
- Invoking a Delegate
- Delegate Example
- Invoking Delegates with Return Values
- Invoking Delegates with Reference Parameters
- Anonymous Methods
- Lambda Expressions
- CHAPTER 16: Events
-
CHAPTER 17: Interfaces
- What Is an Interface?
- Declaring an Interface
- Implementing an Interface
- An Interface Is a Reference Type
- Using the as Operator with Interfaces
- Implementing Multiple Interfaces
- Implementing Interfaces with Duplicate Members
- References to Multiple Interfaces
- An Inherited Member As an Implementation
- Explicit Interface Member Implementations
- Interfaces Can Inherit Interfaces
- CHAPTER 18: Conversions
-
CHAPTER 19: Generics
- What Are Generics?
- Generics in C#
- Generic Classes
- Declaring a Generic Class
- Creating a Constructed Type
- Creating Variables and Instances
- Constraints on Type Parameters
- Generic Methods
- Extension Methods with Generic Classes
- Generic Structs
- Generic Delegates
- Generic Interfaces
- Covariance and Contravariance in Generics
-
CHAPTER 20: Enumerators and Iterators
- Enumerators and Enumerable Types
- Using the IEnumerator Interface
- The IEnumerable Interface
- The Noninterface Enumerator
- The Generic Enumeration Interfaces
- The IEnumerator<T> Interface
- The IEnumerable<T> Interface
- Iterators
- Common Iterator Patterns
- Producing Enumerables and Enumerators
- Producing Multiple Enumerables
- Producing Multiple Enumerators
- Behind the Scenes with Iterators
- CHAPTER 21: Introduction to LINQ
- CHAPTER 22: Introduction to Asynchronous Programming
- CHAPTER 23: Preprocessor Directives
- CHAPTER 24: Reflection and Attributes
- CHAPTER 25: Other Topics
- Index
Product information
- Title: Illustrated C# 2010
- Author(s):
- Release date: December 2010
- Publisher(s): Apress
- ISBN: 9781430232827
You might also like
book
Illustrated C# 2012
This book presents the C# 5.0 language in a uniquely succinct and visual format. Often in …
book
Introducing Visual C# 2010
If you're new to C# programming, this book is the ideal way to get started. Respected …
book
Accelerated C# 2010
C# 2010 offers powerful new features, and this book is the fastest path to mastering them—and …
book
Expert C# 2008 Business Objects
Do you want to create .NET applications that provide high performance and scalability? Do you want …