Home Page Icon
Home Page
Table of Contents for
Dedication
Close
Dedication
by Daniel M. Solis
Illustrated C# 2010
Title Page
Dedication
Contents at a Glance
Contents
About the Author
Acknowledgments
Introduction
CHAPTER 1: C# and the .NET Framework
Before .NET
Enter Microsoft .NET
Compiling to the Common Intermediate Language
Compiling to Native Code and Execution
The Common Language Runtime
The Common Language Infrastructure
Review of the Acronyms
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
A C# Program Is a Set of Type Declarations
A Type Is a Template
Instantiating a Type
Data Members and Function Members
Predefined Types
User-Defined Types
The Stack and the Heap
Value Types and Reference Types
Variables
Static Typing and the dynamic Keyword
Nullable Types
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
The Structure of a Method
Local Variables
Local Constants
Method Invocations
Return Values
Parameters
Value Parameters
Reference Parameters
Output Parameters
Parameter Arrays
Summary of Parameter Types
Method Overloading
Named Parameters
Optional Parameters
Stack Frames
Recursion
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
Class Inheritance
Accessing the Inherited Members
Hiding Members of a Base Class
Base Access
Using References to a Base Class
Constructor Execution
Inheritance Between Assemblies
Member Access Modifiers
Abstract Members
Abstract Classes
Sealed Classes
Static Classes
Extension Methods
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
Referencing Other Assemblies
Namespaces
The using Directives
The Structure of an Assembly
The Identity of an Assembly
Strongly Named Assemblies
Private Deployment of an Assembly
Shared Assemblies and the GAC
Configuration Files
Delayed Signing
CHAPTER 11: Exceptions
What Are Exceptions?
The try Statement
The Exception Classes
The catch Clause
Examples Using Specific catch Clauses
The catch Clauses Section
The finally Block
Finding a Handler for an Exception
Searching Further
Throwing Exceptions
Throwing Without an Exception Object
CHAPTER 12: Structs
What Are Structs?
Structs Are Value Types
Assigning to a Struct
Constructors and Destructors
Field Initializers Are Not Allowed
Structs Are Sealed
Boxing and Unboxing
Structs As Return Values and Parameters
Additional Information About Structs
CHAPTER 13: Enumerations
Enumerations
Bit Flags
More About Enums
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
Events Are Like Delegates
Overview of Source Code Components
Declaring an Event
Raising an Event
Subscribing to an Event
Standard Event Usage
The MyTimerClass Code
Event Accessors
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
What Are Conversions?
Implicit Conversions
Explicit Conversions and Casting
Types of Conversions
Numeric Conversions
Reference Conversions
Boxing Conversions
Unboxing Conversions
User-Defined Conversions
The is Operator
The as Operator
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
What Is LINQ?
LINQ Providers
Query Syntax and Method Syntax
Query Variables
The Structure of Query Expressions
The Standard Query Operators
LINQ to XML
CHAPTER 22: Introduction to Asynchronous Programming
Processes, Threads, and Asynchronous Programming
Parallel Loops
The BackgroundWorker Class
Asynchronous Programming Patterns
BeginInvoke and EndInvoke
Timers
CHAPTER 23: Preprocessor Directives
What Are Preprocessor Directives?
General Rules
The #define and #undef Directives
Conditional Compilation
The Conditional Compilation Constructs
Diagnostic Directives
Line Number Directives
Region Directives
The #pragma warning Directive
CHAPTER 24: Reflection and Attributes
Metadata and Reflection
The Type Class
Getting a Type Object
What Is an Attribute?
Applying an Attribute
Predefined, Reserved Attributes
More About Applying Attributes
Custom Attributes
Accessing an Attribute
CHAPTER 25: Other Topics
Overview
Strings
Parsing Strings to Data Values
More About the Nullable Types
Method Main
Documentation Comments
Nested Types
Interoperating with COM
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Contents at a Glance
I would like to dedicate this book to
Sian; to my parents, Sal and Amy;
and to Sue.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset