- Häftad (Paperback / softback)
- Antal sidor
- John Wiley & Sons Inc
- 234 x 190 x 43 mm
- Antal komponenter
- 1112 g
Du kanske gillar
C# 7.0 All-in-One For Dummies387
- Skickas inom 10-15 vardagar.
- Gratis frakt inom Sverige över 159 kr för privatpersoner.
KundrecensionerHar du läst boken? Sätt ditt betyg »
Introduction 1 About This Book 1 Foolish Assumptions 2 Icons Used in This Book 2 Beyond the Book 3 Where to Go from Here 4 Book 1: The Basics of C# Programming 5 Chapter 1: Creating Your First C# Console Application 7 Getting a Handle on Computer Languages, C#, and .NET 7 Creating Your First Console Application 11 Making Your Console App Do Something 17 Reviewing Your Console Application 18 Introducing the Toolbox Trick 21 Chapter 2: Living with Variability - Declaring Value-Type Variables 23 Declaring a Variable 24 What's an int? 25 Representing Fractions 27 Handling Floating-Point Variables 28 Using the Decimal Type: Is it an Integer or a Float? 31 Examining the bool Type: Is it Logical? 33 Checking Out Character Types 33 What's a Value Type? 36 Comparing string and char 37 Calculating Leap Years: DateTime 38 Declaring Numeric Constants 40 Changing Types: The Cast 41 Letting the C# Compiler Infer Data Types 42 Chapter 3: Pulling Strings 45 The Union is Indivisible, and So are Strings 46 Performing Common Operations on a String 48 Comparing Strings 48 What If I Want to Switch Case? 53 Looping through a String 54 Searching Strings 55 Getting Input from the Command Line 57 Controlling Output Manually 62 Formatting Your Strings Precisely 68 StringBuilder: Manipulating Strings More Efficiently 73 Chapter 4: Smooth Operators 75 Performing Arithmetic 75 Performing Logical Comparisons - Is That Logical? 79 Matching Expression Types at TrackDownAMate.com 83 Chapter 5: Getting into the Program Flow 89 Branching Out with if and switch 90 Here We Go Loop-the-Loop 101 Looping a Specified Number of Times with for 112 Nesting Loops 115 Don't goto Pieces 116 Chapter 6: Lining Up Your Ducks with Collections 119 The C# Array 120 Processing Arrays by Using foreach 126 Sorting Arrays of Data 128 Using var for Arrays 132 Loosening Up with C# Collections 133 Understanding Collection Syntax 134 Using Lists 136 Using Dictionaries 139 Array and Collection Initializers 141 Using Sets 142 On Not Using Old-Fashioned Collections 147 Chapter 7: Stepping through Collections 149 Iterating through a Directory of Files 149 Iterating foreach Collections: Iterators 157 Accessing Collections the Array Way: Indexers 160 Looping Around the Iterator Block 165 Chapter 8: Buying Generic 177 Writing a New Prescription: Generics 178 Classy Generics: Writing Your Own 179 Revising Generics 197 Chapter 9: Some Exceptional Exceptions 201 Using an Exceptional Error-Reporting Mechanism 202 Throwing Exceptions Yourself 207 Knowing What Exceptions are for 207 Can I Get an Exceptional Example? 208 Assigning Multiple catch Blocks 211 Planning Your Exception-Handling Strategy 214 Grabbing Your Last Chance to Catch an Exception 219 Throwing Expressions 220 Chapter 10: Creating Lists of Items with Enumerations 223 Seeing Enumerations in the Real World 224 Working with Enumerations 225 Creating Enumerated Flags 228 Defining Enumerated Switches 230 Book 2: Object-Oriented C# Programming 233 Chapter 1: Object-Oriented Programming - What's it All About? 235 Object-Oriented Concept #1: Abstraction 235 Object-Oriented Concept #2: Classification 238 Why Classify? 238 Object-Oriented Concept #3: Usable Interfaces 239 Object-Oriented Concept #4: Access Control 240 How C# Supports Object-Oriented Concepts 241 Chapter 2: Showing Some Class 243 Defining a Class and an Object 244 Accessing the Members of an Object 246 An Object-Based Program Example 247 Discriminating between Objects 249 Can You Give Me References? 249 Classes That Contain Classes are the Happiest Classes in the World 252 Generating Static in Class Members 253 Defining const and readonly Data Members 255 Chapter 3: We Have Our Methods 257 Defining and Using a Method 257 A Method Example for Your Files 259 Having Arguments wi