Book description
A logical, straightforward approach to learning the C# language
C# is a complicated programming language for building .NET-connected software for Microsoft Windows, the Web, and a wide range of devices. The friendly All-in-One For Dummies format is a perfect way to present it. Each minibook is a self-contained package of necessary information, making it easy to find what you're looking for.
Upgrades in C# 2010 include the ability to build Windows 7 applications and compatibility with Python and Ruby.
C# is a somewhat complex programming language for building .NET-connected software for Microsoft Windows, the Web, and other devices
Beginning C# programmers will appreciate how the All-in-One format breaks the topic into minibooks, each one addressing a key body of information
Minibooks include creating your first C# program, Windows 7 programming, basic C# programming, object-based programming, object-oriented programming, Windows programming with C# and Visual Studio, and debugging
Companion Web site includes all sample code
Beginning C# programmers will find C# 2010 All-in-One For Dummies explains a complicated topic in an easy, understandable way.
Table of contents
- Copyright
- About the Authors
- Acknowledgments
- Publisher's Acknowledgments
- Introduction
-
I. Basics of C# Programming
- 1. Creating Your First C# Console Application
-
2. Living with Variability — Declaring Value-Type Variables
- 2.1. Declaring a Variable
- 2.2. What's an int?
- 2.3. Representing Fractions
- 2.4. Handling Floating-Point Variables
- 2.5. Using the Decimal Type: Is It an Integer or a Float?
- 2.6. Examining the bool Type: Is It Logical?
- 2.7. Checking Out Character Types
- 2.8. What's a Value Type?
- 2.9. Comparing string and char
- 2.10. Calculating Leap Years: DateTime
- 2.11. Declaring Numeric Constants
- 2.12. Changing Types: The Cast
- 2.13. Letting the C# Compiler Infer Data Types
-
3. Pulling Strings
- 3.1. The Union Is Indivisible, and So Are Strings
- 3.2. Performing Common Operations on a String
- 3.3. Comparing Strings
- 3.4. What If I Want to Switch Case?
- 3.5. Looping through a String
- 3.6. Searching Strings
- 3.7. Getting Input from the Command Line
- 3.8. Controlling Output Manually
- 3.9. Formatting Your Strings Precisely
- 3.10. StringBuilder: Manipulating Strings More Efficiently
- 4. Smooth Operators
- 5. Getting Into the Program Flow
-
6. Lining Up Your Ducks with Collections
- 6.1. The C# Array
- 6.2. A Loop Made foreach Array
- 6.3. Sorting Arrays of Data
- 6.4. New Feature: Using var for Arrays
- 6.5. Loosening Up with C# Collections
- 6.6. Understanding Collection Syntax
- 6.7. Using Lists
- 6.8. Using Dictionaries
- 6.9. Array and Collection Initializers
- 6.10. Using Sets
- 6.11. On Not Using Old-Fashioned Collections
-
7. Stepping through Collections
- 7.1. Iterating through a Directory of Files
- 7.2. Iterating foreach Collections: Iterators
- 7.3. Accessing Collections the Array Way: Indexers
- 7.4. Looping Around the Iterator Block
-
8. Buying Generic
- 8.1. Writing a New Prescription: Generics
- 8.2. Classy Generics: Writing Your Own
- 9. Some Exceptional Exceptions
-
II. Object-Oriented C# Programming
- 1. Object-Oriented Programming: What's It All About?
-
2. Showing Some Class
- 2.1. Defining a Class and an Object
- 2.2. Accessing the Members of an Object
- 2.3. An Object-Based Program Example
- 2.4. Discriminating between Objects
- 2.5. Can You Give Me References?
- 2.6. Classes That Contain Classes Are the Happiest Classes in the World
- 2.7. Generating Static in Class Members
- 2.8. Defining const and readonly Data Members
- 3. We Have Our Methods
- 4. Let Me Say This about this
- 5. Holding a Class Responsible
-
6. Inheritance: Is That All I Get?
- 6.1. Class Inheritance
- 6.2. Why You Need Inheritance
- 6.3. Inheriting from a BankAccount Class (A More Complex Example)
- 6.4. IS_A versus HAS_A — I'm So Confused_A
- 6.5. When to IS_A and When to HAS_A
- 6.6. Other Features That Support Inheritance
- 6.7. The object Class
- 6.8. Inheritance and the Constructor
- 6.9. The Updated BankAccount Class
- 7. Poly-what-ism?
-
8. Interfacing with the Interface
- 8.1. Introducing CAN_BE_USED_AS
- 8.2. Knowing What an Interface Is
- 8.3. Using an Interface
- 8.4. Using the C# Predefined Interface Types
- 8.5. Looking at a Program That CAN_BE_USED_AS an Example
- 8.6. Unifying Class Hierarchies
- 8.7. Hiding Behind an Interface
- 8.8. Inheriting an Interface
- 8.9. Using Interfaces to Manage Change in Object-Oriented Programs
-
9. Delegating Those Important Events
- 9.1. E.T., Phone Home — The Callback Problem
- 9.2. Defining a Delegate
- 9.3. Pass Me the Code, Please — Examples
- 9.4. A More Real-World Example
- 9.5. Shh! Keep It Quiet — Anonymous Methods
-
9.6. Stuff Happens — C# Events
- 9.6.1. The Observer design pattern
- 9.6.2. What's an event? Publish/Subscribe
- 9.6.3. How a publisher advertises its events
- 9.6.4. How subscribers subscribe to an event
- 9.6.5. How to publish an event
- 9.6.6. How to pass extra information to an event handler
- 9.6.7. A recommended way to raise your events
- 9.6.8. How observers "handle" an event
- 10. Can I Use Your Namespace in the Library?
-
III. Designing for C#
- 1. Writing Secure Code
-
2. Accessing Data
- 2.1. Getting to Know System.Data
- 2.2. How the Data Classes Fit into the Framework
- 2.3. Getting to Your Data
- 2.4. Using the System.Data Namespace
- 3. Fishing the FileStream
- 4. Accessing the Internet
- 5. Creating Images
-
IV. A Tour of Visual Studio
- 1. Getting Started with Visual Studio
- 2. Using the Interface
- 3. Customizing Visual Studio
- 4. Transforming Text Templates
-
V. Windows Development with WPF
- 1. Introducing WPF
-
2. Understanding the Basics of WPF
- 2.1. Using WPF to Lay Out Your Application
- 2.2. Arranging Elements with Layout Panels
- 2.3. Exploring Common XAML Controls
- 3. Data Binding in WPF
- 4. Practical WPF
-
VI. Web Development with ASP.NET
- 1. Looking at How ASP.NET Works with C#
- 2. Building Web Applications
- 3. Controlling Your Development Experience
- 4. Leveraging the .NET Framework
- 5. Digging into Web Construction
- VII. Service-Oriented Development
- VIII. New Features in C# 4.0
Product information
- Title: C# 2010 All-in-One For Dummies®
- Author(s):
- Release date: April 2010
- Publisher(s): For Dummies
- ISBN: 9780470563489
You might also like
book
Accelerated C# 2010
C# 2010 offers powerful new features, and this book is the fastest path to mastering them—and …
book
Essential C# 6.0
“ Welcome to one of the greatest collaborations you could dream of in the world of …
book
iPhone For Dummies, 2022nd Edition
My phone, your phone, iPhone—the fully updated guide to the latest models and iOS updates Apple …
book
Programming Microsoft® Visual C#® 2008: The Language
Get the in-depth reference and pragmatic, real-world insights you need to exploit the enhanced language features …