Book description
If you're new to C# programming, this book is the ideal way to get started. Respected author Adam Freeman guides you through the C# language by carefully building up your knowledge from fundamental concepts to advanced features.
The book gradually builds up your knowledge, using the concepts you have already grasped to support those that come next. You will explore all the core areas of the C# language and the .NET Framework on which it runs. Particular attention is paid to the creation of Web and Windows applications and data access—danger zones where novice programmers often go awry in their early coding attempts.
Introducing Visual C# 2010 is a comprehensive primer. Even if you have no previous programming experience, you can have confidence in the fact that you'll be able to build well constructed web and Windows applications of your own once you have finished reading this book.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
-
I. Getting Started
- 1. Introduction
- 2. Getting Ready
-
3. Understanding C# and the .NET Framework
- 3.1. C# and the .NET Framework at a Glance
-
3.2. The Key Features of C# and the .NET Framework
- 3.2.1. Understanding Object-Orientation
- 3.2.2. Understanding Type Safety
- 3.2.3. Understanding Automatic Memory Management
- 3.2.4. Understanding the Just-In-Time Compiler
- 3.2.5. Understanding Parallel Processing
- 3.2.6. Understanding Unmanaged/Native Code Support
- 3.2.7. Understanding the .NET Technology Spectrum
- 3.3. Understanding .NET Cross-Platform Support
- 3.4. Summary
-
II. The C# Language
-
4. C# Fundamentals and Keyword Reference
- 4.1. Language Fundamentals
- 4.2. Common Programming Tasks
-
4.3. Keyword and Operator Reference
- 4.3.1. Type Keywords
- 4.3.2. Modifiers
- 4.3.3. Selection Keywords
- 4.3.4. Iterator Keywords
- 4.3.5. Jump Keywords
- 4.3.6. Exception Handling Keywords
- 4.3.7. Arithmetic Overflow Keywords
- 4.3.8. Synchronization Keywords
- 4.3.9. Parameter Keywords
- 4.3.10. Namespace Keywords
- 4.3.11. Literal Keywords
- 4.3.12. Object Keywords
- 4.3.13. LINQ Keywords
- 4.3.14. Other Keywords
-
4.3.15. Operators
- 4.3.15.1. [ ] Operator
- 4.3.15.2. ( ) Operator
- 4.3.15.3. Dot (.) Operator
- 4.3.15.4. :: Operator
- 4.3.15.5. +, -, *, /, % Operators
- 4.3.15.6. ==, !=, >, >=, <, <= Operators
- 4.3.15.7. ++, +=, --, -= Operators
- 4.3.15.8. &&, || Operators
- 4.3.15.9. &, |, ^, ~, <<, >> Operators
- 4.3.15.10. => Operator
- 4.3.15.11. =, +=, -=, *=, /=, %=, &=, >>=, <<=, ^= Operators
- 4.4. Summary
- 5. Numeric and Boolean Types
- 6. Classes and Objects
- 7. Fields
-
8. Properties, Indexers, and Operators
- 8.1. Creating a Property
- 8.2. Creating an Indexer
- 8.3. Creating Custom Operators
- 8.4. Summary
-
9. Methods
- 9.1. Creating and Using a Simple Method
- 9.2. Understanding Parameters
- 9.3. Understanding Method Bodies
- 9.4. Understanding Method Modifiers
- 9.5. Overloading Methods
- 9.6. Hiding and Overriding Methods
-
9.7. Special Methods
- 9.7.1. The Main Method
-
9.7.2. Constructors
- 9.7.2.1. Using the Default Constructor
- 9.7.2.2. Initializing Properties and Fields at Construction
- 9.7.2.3. Overloading Constructors
- 9.7.2.4. Calling Base Class Constructors
- 9.7.2.5. Controlling Access to Constructors
- 9.7.2.6. Creating Copy Constructors
- 9.7.2.7. Using Static Constructors
- 9.7.2.8. Creating Factory Methods
- 9.7.3. Destructors
- 9.7.4. Iterator Blocks
- 9.7.5. Partial Methods
- 9.7.6. Abstract Methods
- 9.7.7. Extension Methods
- 9.8. Summary
- 10. Delegates, Events, and Anonymous Methods
- 11. Namespaces
- 12. Interfaces, Structs, and Enums
-
13. Arrays
- 13.1. Defining and Initializing Arrays
- 13.2. Getting and Setting Array Values
- 13.3. Using Array Initializers
- 13.4. Enumerating Arrays
- 13.5. Using System.Array Members
- 13.6. Using Arrays with LINQ
- 13.7. Using Arrays as Collections
- 13.8. Using Multidimensional Arrays
- 13.9. Summary
- 14. Exceptions
-
15. Generic and Anonymous Types
-
15.1. Using Generic Types
- 15.1.1. Defining a Generic Class
- 15.1.2. Creating Objects from Generic Classes
- 15.1.3. Implementing and Using Generic Class Members
- 15.1.4. Defining Multiple Parameter Types
- 15.1.5. Casting from Parameterized Types
- 15.1.6. Constraining Parameterized Types
- 15.1.7. Defining a Method-Specific Parameterized Type
- 15.1.8. Deriving from a Generic Base Class
- 15.1.9. Creating Generic Interfaces
- 15.1.10. Creating Generic Structs
- 15.1.11. Type Variance
- 15.1.12. Using the default Keyword
- 15.2. Using Anonymous Types
- 15.3. Summary
-
15.1. Using Generic Types
- 16. Strings and Characters
- 17. Attributes
- 18. Garbage Collection
-
4. C# Fundamentals and Keyword Reference
-
III. The .NET Class Library
-
19. Collections
- 19.1. The ICollection<T> Interface
- 19.2. Generic Lists
- 19.3. Generic Dictionaries
- 19.4. Generic Sets
- 19.5. Generic Queues and Stacks
- 19.6. Other Generic Collection Interfaces
- 19.7. Treating Arrays as Collections
- 19.8. Creating Constrained Collections
- 19.9. Legacy Collections
- 19.10. Summary
-
20. Files, Streams, and IO
- 20.1. Working with Files and Directories
- 20.2. Working with Streams, Readers, and Writers
- 20.3. Summary
- 21. Networking & WCF
- 22. Time & Dates
- 23. Serialization
-
24. Parallel Programming
- 24.1. Understanding Single- and Multi-Threaded Execution
- 24.2. Getting Started with Tasks
- 24.3. Getting Results from Tasks
- 24.4. Passing Parameters to a Task
- 24.5. Getting the Status of a Task
- 24.6. Canceling Tasks
- 24.7. Handling Task Exceptions
- 24.8. Chaining Tasks Together
- 24.9. Sharing Data between Tasks
- 24.10. Using Concurrent Collections
- 24.11. Summary
- 25. Asynchronous Methods and Parallel Loops
-
26. Other Useful Features and Classes
- 26.1. Converting Between Types
- 26.2. Returning Multiple Results from Methods Using Tuples
- 26.3. Aliasing Generic Types
- 26.4. Using Nullable Types
- 26.5. Working with the Console
- 26.6. Generating Random Numbers
- 26.7. Converting Strings to and from Bytes
- 26.8. Getting Environment Information
- 26.9. Performing Math Operations
- 26.10. Using Conditional Compilation
- 26.11. Checking Network Connectivity
- 26.12. Summary
-
19. Collections
-
IV. Data and Databases
-
27. LINQ to Objects
- 27.1. Performing a Simple LINQ Query
- 27.2. Performing LINQ Operations
- 27.3. Using Method Syntax
- 27.4. Understanding Deferred Execution
- 27.5. Converting Query Results
- 27.6. Using Legacy Collections as LINQ Data Sources
- 27.7. Performing Advanced LINQ Operations
- 27.8. Summary
- 28. Parallel LINQ
-
29. LINQ to XML
- 29.1. Using the LINQ XML Classes
- 29.2. Using LINQ to XML Queries
- 29.3. Summary
- 30. LINQ to Entities
- 31. LINQ to DataSet
-
27. LINQ to Objects
-
V. User Interfaces
-
32. Windows Forms
- 32.1. Building a Stand-Alone Window Forms Program
- 32.2. Using Windows Forms Data Binding
- 32.3. Windows 7 UI Integration
- 32.4. Summary
-
33. Windows Presentation Foundation
-
33.1. Building a Stand-Alone WPF Program
- 33.1.1. Creating the Project
- 33.1.2. Adding the Controls
- 33.1.3. Setting the Control Properties
- 33.1.4. Adding the StatusBar Item
- 33.1.5. Adding the Menu Item
- 33.1.6. Setting the Tab Order
- 33.1.7. Wiring the Controls
- 33.1.8. Managing the Focus
- 33.1.9. Setting the Program Icon and Window Name
- 33.1.10. Testing the Program
- 33.2. Using WPF Data Binding
- 33.3. Using WPF-Specific Features
- 33.4. Summary
-
33.1. Building a Stand-Alone WPF Program
-
34. ASP.NET
- 34.1. Building a Web Forms Program
- 34.2. Using Web Forms Data Binding
- 34.3. Using ASP.NET Dynamic Data
- 34.4. Summary
-
35. Silverlight
- 35.1. Creating the Swimming Calculator
- 35.2. Using a WCF RIA Service
- 35.3. Using Silverlight Out-of-Browser Support
- 35.4. Using a Silverlight Program Out-of-Browser
- 35.5. Summary
-
32. Windows Forms
-
VI. Advanced Topics
- 36. Windows Integration
- 37. Cryptography and Security
- 38. Testing and Debugging
Product information
- Title: Introducing Visual C# 2010
- Author(s):
- Release date: November 2010
- Publisher(s): Apress
- ISBN: 9781430231714
You might also like
book
Illustrated C# 2010
This book presents the C# language in a uniquely succinct and visual format. Often in programming …
book
Visual C# 2010 Recipes: A Problem-Solution Approach
When you are facing a Visual C# 2010 problem, this book likely contains a recipe that …
book
Visual Basic® 2012 Unleashed, Second Edition
Fully updated for Windows 8 support, .NET 4.5, and Windows Phone development, this is the most …
book
C# 3.0 Unleashed: With the .NET Framework 3.5
Whether you need an approachable on-ramp to .NET or you want to enhance your skills, C# …