| | Copyright |
| | Acknowledgments |
| | Introduction |
| | | .NET Framework Gossip |
| | | What Is the .NET Framework? |
| | | So What Is C#? |
| | | ASP.NET |
| | | What Is this Book About? |
| | | Whom Is this Book For? |
| | | About the Author |
| | | What You Need in Order to Learn C# |
| | | Final Thoughts |
|
| | Chapter 1. Getting Started |
| | | Getting C# |
| | | Installing Internet Information Services (IIS) |
| | | Creating a Web Project with Visual Studio .NET |
| | | Debugging Web Projects with Visual Studio .NET |
| | | Writing a Simple ASP .NET Page |
| | | Debugging ASP .NET Applicatons |
| | | Running the Compiler Manually |
| | | Compiling and Executing C# Programs without VS .NET |
| | | Debugging Applications Outside VS .NET |
|
| | Chapter 2. C# Building Blocks |
| | | Working with C# Building Blocks |
| | | Writing C# Code |
| | | Declaring Variables |
| | | Defining Constants |
| | | Grouping Constants into Enumerated Types |
| | | Declaring Functions |
| | | Declaring Functions with Parameters |
| | | Returning Function Values |
| | | Defining a Class |
| | | Adding Classes to the Sample Application |
| | | Creating and Using Objects |
| | | Creating Objects in the Sample Application |
| | | Including Class Definitions from Outside Sources |
| | | Grouping Classes into Namespaces |
| | | Adding Fields to Classes |
| | | Initializing Fields in Place |
| | | Adding Properties to Classes |
| | | Adding Methods to Classes |
| | | Adding Members to the Classes in the Sample Code |
| | | Completing the Sample Application |
| | | Adding Comments |
| | | Understanding Parameter Direction for Reference Types |
|
| | Chapter 3. Conditionals and Loops |
| | | Working with Loops and Conditionals |
| | | Comparing Numeric Types |
| | | Comparing Reference Types |
| | | Combining Test Clauses |
| | | Writing if-else Statements |
| | | Testing Multiple Conditions with switch |
| | | Conditional Operator |
| | | Adding Conditional Statements to the Sample Program |
| | | Using while Loops |
| | | Using do Loops |
| | | Using for Loops |
| | | Exiting and Continuing Loops |
| | | Adding Loops to the Sample Program |
|
| | Chapter 4. Strings |
| | | Preparing Your Machine to Work with Strings |
| | | Working with Strings |
| | | Initializing Strings |
| | | Comparing Strings |
| | | Concatenating Strings |
| | | Finding the String Length |
| | | Comparing and Concatenating Strings in the Sample Application |
| | | Creating Strings from Characters |
| | | Using Escape Characters |
| | | Using Literal Strings |
| | | Accessing the String's Characters |
| | | Finding a Substring within a String |
| | | Extracting Part of the String |
| | | Splitting a String |
| | | Joining a String |
| | | Uppercasing and Lowercasing |
| | | Formatting Strings |
| | | Finishing the Sample Application |
| | | Representing Objects as Strings |
| | | Allocating Strings with StringBuilder |
|
| | Chapter 5. Class Inheritance |
| | | Working with Class Inheritance |
| | | Inheriting a Class from Another |
| | | Exposing and Restricting Access to Members |
| | | Enhancing the Sample Application |
| | | Hiding Methods from the Base Class |
| | | Overriding Functions in a Derived Class |
| | | Adding a Generic Button to the Sample Application |
| | | Using the Generic Button in the WorkOrder Form |
| | | Adding Functions that Must Be Overridden |
| | | Requiring Inheritance |
| | | Blocking Inheritance |
|
| | Chapter 6. Special Members |
| | | Adding Functions with the Same Name (Method Overloading) |
| | | Defining Functions with a Variable Number of Parameters |
| | | Adding Constructors |
| | | Invoking Base Constructors |
| | | Adding Finalizers |
| | | Building Code Libraries with Static Members |
| | | Redefining the Meaning of Operators (Operator Overloading) |
| | | Redefining Equality by Overriding == |
| | | Redefining Equality by Overriding Equals |
| | | Working with Special Members |
|
| | Chapter 7. Types |
| | | Working with Types |
| | | Obtaining a Class's Type |
| | | Testing for Type Compatibility |
| | | Converting From One Type to Another (Casting) |
| | | Extending the Sample Application |
| | | Defining Casting Rules (Cast Operator Overloading) |
|
| | Chapter 8. Interfaces |
| | | Working with Interfaces |
| | | Defining Interfaces |
| | | Implementing Interface Members Implicitly |
| | | Implementing Interface Members Explicitly |
| | | Enhancing the Sample Application |
| | | Using Objects through Interfaces |
| | | Interface Discovery |
| | | Using Interfaces for Polymorphism |
| | | Deriving One Interface from Another |
| | | Refactoring |
| | | Re-Implementing Interfaces in a Derived Class |
| | | Finishing the Sample Application |
|
| | Chapter 9. Arrays and Collections |
| | | Working with Arrays and Collections |
| | | Creating Arrays of Valuetypes |
| | | Creating Arrays of Reference Types |
| | | Navigating through the Array |
| | | Initializing Array Elements in Place |
| | | Creating Multi-Dimensional Arrays |
| | | Enhancing the Sample Application |
| | | Finding Array Elements Using Linear Searches |
| | | Sorting Arrays |
| | | Finding Array Elements Using Binary Searches |
| | | Making Classes Behave Like Arrays (Adding Indexers) |
| | | Adding Indexers to the Sample Application |
| | | Copying an Array |
| | | Creating Dynamic Lists |
| | | Creating Queues |
| | | Creating Stacks |
| | | Creating HashTables |
| | | Navigating through HashTables |
| | | Finishing the Sample Application |
| | | Testing the CodeGridWebControl |
|
| | Chapter 10. Delegates and Events |
| | | Working with Delegates and Events |
| | | Declaring a Delegate |
| | | Creating and Invoking Delegates |
| | | Combining Delegates |
| | | Removing Delegates |
| | | Declaring and Firing Events |
| | | Adding Events that are Web Friendly |
| | | Subscribing to Events |
| | | Firing Delegates Asynchronously |
| | | Waiting for Asynchronous Delegates to Complete |
| | | Retrieving Results from Asynchronous Delegates |
| | | Finishing the Sample Application |
|
| | Chapter 11. Error Handling |
| | | Working with Exceptions |
| | | Catching Exceptions |
| | | Catching Specific Exceptions |
| | | Obtaining Exception Information |
| | | Working with Exception Chains |
| | | Declaring Your Own Exceptions |
| | | Setting the Error Message |
| | | Generating an Exception |
| | | Catching and Re-throwing Exceptions |
| | | Building an Exception Chain |
| | | Adding Code that Executes Before Exiting the Function |
| | | Using using |
| | | Adding Form Security to the Sample Application |
| | | Handling Unhandled Errors in Web Applications |
|
| | Chapter 12. Reflection and Attributes |
| | | Working with Reflection and Attributes |
| | | Identifying an Assembly |
| | | Working with Display Names |
| | | Working with Path Strings |
| | | Loading a Program Dynamically with a Display String |
| | | Loading a Program Dynamically with a Path String |
| | | Instantiating a Class in the Assembly |
| | | Enumerating Through the Classes in an Assembly |
| | | Listing the Members of a Class |
| | | Setting or Getting a Field Dynamically |
| | | Invoking a Method Dynamically |
| | | Completing Task One in the Sample Application |
| | | Applying Attributes to Code |
| | | Defining Attributes |
| | | Searching Code for Attributes |
| | | Completing Task Two in the Sample Application |
|
| | Chapter 13. C# Web Projects |
| | | Creating a DLL Project with Visual Studio .NET |
| | | Referencing and Executing DLL Code |
| | | Making DLLs Globally Available |
| | | Creating Web Services |
| | | Consuming Web Services |
|