1 - Title Page [Seite 5]
2 - Copyright Page [Seite 6]
3 - Table of Contents [Seite 9]
4 - Introduction [Seite 25]
4.1 - About This Book [Seite 25]
4.2 - Foolish Assumptions [Seite 26]
4.3 - Icons Used in This Book [Seite 26]
4.4 - Beyond the Book [Seite 27]
4.5 - Where to Go from Here [Seite 28]
5 - Book 1 The Basics of C# Programming [Seite 29]
5.1 - Chapter 1 Creating Your First C# Console Application [Seite 31]
5.1.1 - Getting a Handle on Computer Languages, C#, and .NET [Seite 31]
5.1.1.1 - What's a program? [Seite 32]
5.1.1.2 - What's C#? [Seite 32]
5.1.1.3 - What's .NET? [Seite 33]
5.1.1.4 - What is Visual Studio 2017? What about Visual C#? [Seite 34]
5.1.2 - Creating Your First Console Application [Seite 35]
5.1.2.1 - Creating the source program [Seite 35]
5.1.2.2 - Taking it out for a test drive [Seite 40]
5.1.3 - Making Your Console App Do Something [Seite 41]
5.1.4 - Reviewing Your Console Application [Seite 42]
5.1.4.1 - The program framework [Seite 42]
5.1.4.2 - Comments [Seite 43]
5.1.4.3 - The meat of the program [Seite 44]
5.1.5 - Introducing the Toolbox Trick [Seite 45]
5.1.5.1 - Saving code in the Toolbox [Seite 45]
5.1.5.2 - Reusing code from the Toolbox [Seite 46]
5.2 - Chapter 2 Living with Variability - Declaring Value-Type Variables [Seite 47]
5.2.1 - Declaring a Variable [Seite 48]
5.2.2 - What's an int? [Seite 49]
5.2.2.1 - Rules for declaring variables [Seite 49]
5.2.2.2 - Variations on a theme: Different types of int [Seite 50]
5.2.3 - Representing Fractions [Seite 51]
5.2.4 - Handling Floating-Point Variables [Seite 52]
5.2.4.1 - Declaring a floating-point variable [Seite 53]
5.2.4.2 - Examining some limitations of floating-point variables [Seite 54]
5.2.5 - Using the Decimal Type: Is It an Integer or a Float? [Seite 55]
5.2.5.1 - Declaring a decimal [Seite 56]
5.2.5.2 - Comparing decimals, integers, and floating-point types [Seite 56]
5.2.6 - Examining the bool Type: Is It Logical? [Seite 57]
5.2.7 - Checking Out Character Types [Seite 57]
5.2.7.1 - The char variable type [Seite 58]
5.2.7.2 - Special chars [Seite 58]
5.2.7.3 - The string type [Seite 59]
5.2.8 - What's a Value Type? [Seite 60]
5.2.9 - Comparing string and char [Seite 61]
5.2.10 - Calculating Leap Years: DateTime [Seite 62]
5.2.11 - Declaring Numeric Constants [Seite 64]
5.2.12 - Changing Types: The Cast [Seite 65]
5.2.13 - Letting the C# Compiler Infer Data Types [Seite 66]
5.3 - Chapter 3 Pulling Strings [Seite 69]
5.3.1 - The Union Is Indivisible, and So Are Strings [Seite 70]
5.3.2 - Performing Common Operations on a String [Seite 72]
5.3.3 - Comparing Strings [Seite 72]
5.3.3.1 - Equality for all strings: The Compare() method [Seite 73]
5.3.3.2 - Would you like your compares with or without case? [Seite 76]
5.3.4 - What If I Want to Switch Case? [Seite 77]
5.3.4.1 - Distinguishing between all-uppercase and all-lowercase strings [Seite 77]
5.3.4.2 - Converting a string to upper- or lowercase [Seite 78]
5.3.5 - Looping through a String [Seite 78]
5.3.6 - Searching Strings [Seite 79]
5.3.6.1 - Can I find it? [Seite 79]
5.3.6.2 - Is my string empty? [Seite 80]
5.3.7 - Getting Input from the Command Line [Seite 81]
5.3.7.1 - Trimming excess white space [Seite 81]
5.3.7.2 - Parsing numeric input [Seite 81]
5.3.7.3 - Handling a series of numbers [Seite 84]
5.3.7.4 - Joining an array of strings into one string [Seite 86]
5.3.8 - Controlling Output Manually [Seite 86]
5.3.8.1 - Using the Trim() and Pad() methods [Seite 87]
5.3.8.2 - Using the Concatenate() method [Seite 89]
5.3.8.3 - Let's Split() that concatenate program [Seite 91]
5.3.9 - Formatting Your Strings Precisely [Seite 92]
5.3.10 - StringBuilder: Manipulating Strings More Efficiently [Seite 97]
5.4 - Chapter 4 Smooth Operators [Seite 99]
5.4.1 - Performing Arithmetic [Seite 99]
5.4.1.1 - Simple operators [Seite 99]
5.4.1.2 - Operating orders [Seite 100]
5.4.1.3 - The assignment operator [Seite 101]
5.4.1.4 - The increment operator [Seite 102]
5.4.2 - Performing Logical Comparisons - Is That Logical? [Seite 103]
5.4.2.1 - Comparing floating-point numbers: Is your float bigger than mine? [Seite 104]
5.4.2.2 - Compounding the confusion with compound logical operations [Seite 105]
5.4.3 - Matching Expression Types at TrackDownAMate.com [Seite 107]
5.4.3.1 - Calculating the type of an operation [Seite 108]
5.4.3.2 - Assigning types [Seite 109]
5.4.3.3 - Changing how an operator works: Operator overloading [Seite 110]
5.5 - Chapter 5 Getting into the Program Flow [Seite 113]
5.5.1 - Branching Out with if and switch [Seite 114]
5.5.1.1 - Introducing the if statement [Seite 115]
5.5.1.2 - Examining the else statement [Seite 118]
5.5.1.3 - Avoiding even the else [Seite 119]
5.5.1.4 - Nesting if statements [Seite 120]
5.5.1.5 - Running the switchboard [Seite 123]
5.5.2 - Here We Go Loop-the-Loop [Seite 125]
5.5.2.1 - Looping for a while [Seite 126]
5.5.2.2 - Doing the do . . . while loop [Seite 130]
5.5.2.3 - Breaking up is easy to do [Seite 130]
5.5.2.4 - Looping until you get it right [Seite 131]
5.5.2.5 - Focusing on scope rules [Seite 136]
5.5.3 - Looping a Specified Number of Times with for [Seite 136]
5.5.3.1 - An example [Seite 137]
5.5.3.2 - Why do you need another loop? [Seite 138]
5.5.4 - Nesting Loops [Seite 139]
5.5.5 - Don't goto Pieces [Seite 140]
5.6 - Chapter 6 Lining Up Your Ducks with Collections [Seite 143]
5.6.1 - The C# Array [Seite 144]
5.6.1.1 - The argument for the array [Seite 144]
5.6.1.2 - The fixed-value array [Seite 145]
5.6.1.3 - The variable-length array [Seite 146]
5.6.1.4 - The Length property [Seite 149]
5.6.1.5 - Initializing an array [Seite 150]
5.6.2 - Processing Arrays by Using foreach [Seite 150]
5.6.3 - Sorting Arrays of Data [Seite 152]
5.6.4 - Using var for Arrays [Seite 156]
5.6.5 - Loosening Up with C# Collections [Seite 157]
5.6.6 - Understanding Collection Syntax [Seite 158]
5.6.6.1 - Figuring out [Seite 159]
5.6.6.2 - Going generic [Seite 159]
5.6.7 - Using Lists [Seite 160]
5.6.7.1 - Instantiating an empty list [Seite 160]
5.6.7.2 - Creating a list of type int [Seite 161]
5.6.7.3 - Creating a list to hold objects [Seite 161]
5.6.7.4 - Converting between lists and arrays [Seite 162]
5.6.7.5 - Counting list elements [Seite 162]
5.6.7.6 - Searching lists [Seite 162]
5.6.7.7 - Performing other list tasks [Seite 162]
5.6.8 - Using Dictionaries [Seite 163]
5.6.8.1 - Creating a dictionary [Seite 163]
5.6.8.2 - Searching a dictionary [Seite 163]
5.6.8.3 - Iterating a dictionary [Seite 164]
5.6.9 - Array and Collection Initializers [Seite 165]
5.6.9.1 - Initializing arrays [Seite 165]
5.6.9.2 - Initializing collections [Seite 165]
5.6.10 - Using Sets [Seite 166]
5.6.10.1 - Performing special set tasks [Seite 167]
5.6.10.2 - Creating a set [Seite 167]
5.6.10.3 - Adding items to a set [Seite 168]
5.6.10.4 - Performing a union [Seite 168]
5.6.10.5 - Performing an intersection [Seite 169]
5.6.10.6 - Performing a difference [Seite 171]
5.6.11 - On Not Using Old-Fashioned Collections [Seite 171]
5.7 - Chapter 7 Stepping through Collections [Seite 173]
5.7.1 - Iterating through a Directory of Files [Seite 173]
5.7.1.1 - Using the LoopThroughFiles program [Seite 174]
5.7.1.2 - Getting started [Seite 175]
5.7.1.3 - Obtaining the initial input [Seite 175]
5.7.1.4 - Creating a list of files [Seite 177]
5.7.1.5 - Formating the output lines [Seite 178]
5.7.1.6 - Displaying the hexadecimal output [Seite 179]
5.7.2 - Iterating foreach Collections: Iterators [Seite 181]
5.7.2.1 - Accessing a collection: The general problem [Seite 181]
5.7.2.2 - Letting C# access data foreach container [Seite 183]
5.7.3 - Accessing Collections the Array Way: Indexers [Seite 184]
5.7.3.1 - Indexer format [Seite 185]
5.7.3.2 - An indexer program example [Seite 185]
5.7.4 - Looping Around the Iterator Block [Seite 189]
5.7.4.1 - Creating the required iterator block framework [Seite 190]
5.7.4.2 - Iterating days of the month: A first example [Seite 192]
5.7.4.3 - What a collection is, really [Seite 194]
5.7.4.4 - Iterator syntax gives up so easily [Seite 195]
5.7.4.5 - Iterator blocks of all shapes and sizes [Seite 197]
5.8 - Chapter 8 Buying Generic [Seite 201]
5.8.1 - Writing a New Prescription: Generics [Seite 202]
5.8.1.1 - Generics are type-safe [Seite 202]
5.8.1.2 - Generics are efficient [Seite 203]
5.8.2 - Classy Generics: Writing Your Own [Seite 203]
5.8.2.1 - Shipping packages at OOPs [Seite 204]
5.8.2.2 - Queuing at OOPs: PriorityQueue [Seite 205]
5.8.2.3 - Unwrapping the package [Seite 210]
5.8.2.4 - Touring Main() [Seite 212]
5.8.2.5 - Writing generic code the easy way [Seite 213]
5.8.2.6 - Saving PriorityQueue for last [Seite 214]
5.8.2.7 - Using a (nongeneric) Simple Factory class [Seite 217]
5.8.2.8 - Tending to unfinished business [Seite 219]
5.8.3 - Revising Generics [Seite 221]
5.8.3.1 - Variance [Seite 222]
5.8.3.2 - Contravariance [Seite 223]
5.8.3.3 - Covariance [Seite 224]
5.9 - Chapter 9 Some Exceptional Exceptions [Seite 225]
5.9.1 - Using an Exceptional Error-Reporting Mechanism [Seite 226]
5.9.1.1 - About try blocks [Seite 227]
5.9.1.2 - About catch blocks [Seite 227]
5.9.1.3 - About finally blocks [Seite 228]
5.9.1.4 - What happens when an exception is thrown [Seite 229]
5.9.2 - Throwing Exceptions Yourself [Seite 231]
5.9.3 - Knowing What Exceptions Are For [Seite 231]
5.9.4 - Can I Get an Exceptional Example? [Seite 232]
5.9.4.1 - Knowing what makes the example exceptional [Seite 234]
5.9.4.2 - Tracing the stack [Seite 234]
5.9.5 - Assigning Multiple catch Blocks [Seite 235]
5.9.6 - Planning Your Exception-Handling Strategy [Seite 238]
5.9.6.1 - Some questions to guide your planning [Seite 238]
5.9.6.2 - Guidelines for code that handles errors well [Seite 239]
5.9.6.3 - How to analyze a method for possible exceptions [Seite 240]
5.9.6.4 - How to find out which methods throw which exceptions [Seite 242]
5.9.7 - Grabbing Your Last Chance to Catch an Exception [Seite 243]
5.9.8 - Throwing Expressions [Seite 244]
5.10 - Chapter 10 Creating Lists of Items with Enumerations [Seite 247]
5.10.1 - Seeing Enumerations in the Real World [Seite 248]
5.10.2 - Working with Enumerations [Seite 249]
5.10.2.1 - Using the enum keyword [Seite 249]
5.10.2.2 - Creating enumerations with initializers [Seite 250]
5.10.2.3 - Specifying an enumeration data type [Seite 251]
5.10.3 - Creating Enumerated Flags [Seite 252]
5.10.4 - Defining Enumerated Switches [Seite 254]
6 - Book 2 Object-Oriented C# Programming [Seite 257]
6.1 - Chapter 1 Object-Oriented Programming - What's It All About? [Seite 259]
6.1.1 - Object-Oriented Concept #1: Abstraction [Seite 259]
6.1.1.1 - Preparing procedural trips [Seite 260]
6.1.1.2 - Preparing object-oriented trips [Seite 261]
6.1.2 - Object-Oriented Concept #2: Classification [Seite 262]
6.1.3 - Why Classify? [Seite 262]
6.1.4 - Object-Oriented Concept #3: Usable Interfaces [Seite 263]
6.1.5 - Object-Oriented Concept #4: Access Control [Seite 264]
6.1.6 - How C# Supports Object-Oriented Concepts [Seite 265]
6.2 - Chapter 2 Showing Some Class [Seite 267]
6.2.1 - Defining a Class and an Object [Seite 268]
6.2.1.1 - Defining a class [Seite 268]
6.2.1.2 - What's the object? [Seite 269]
6.2.2 - Accessing the Members of an Object [Seite 270]
6.2.3 - An Object-Based Program Example [Seite 271]
6.2.4 - Discriminating between Objects [Seite 273]
6.2.5 - Can You Give Me References? [Seite 273]
6.2.6 - Classes That Contain Classes Are the Happiest Classes in the World [Seite 276]
6.2.7 - Generating Static in Class Members [Seite 277]
6.2.8 - Defining const and readonly Data Members [Seite 279]
6.3 - Chapter 3 We Have Our Methods [Seite 281]
6.3.1 - Defining and Using a Method [Seite 281]
6.3.2 - A Method Example for Your Files [Seite 283]
6.3.3 - Having Arguments with Methods [Seite 291]
6.3.3.1 - Passing an argument to a method [Seite 291]
6.3.3.2 - Passing multiple arguments to methods [Seite 292]
6.3.3.3 - Matching argument definitions with usage [Seite 294]
6.3.3.4 - Overloading a method doesn't mean giving it too much to do [Seite 295]
6.3.3.5 - Implementing default arguments [Seite 296]
6.3.4 - Returning Values after Christmas [Seite 299]
6.3.4.1 - Returning a value via return postage [Seite 300]
6.3.4.2 - Defining a method with no value [Seite 301]
6.3.5 - Returning Multiple Values Using Tuples [Seite 303]
6.3.5.1 - Using a single-entry tuple [Seite 303]
6.3.5.2 - Relying on the Create() method [Seite 304]
6.3.5.3 - Using a multi-entry tuple [Seite 305]
6.3.5.4 - Creating tuples with more than two items [Seite 306]
6.4 - Chapter 4 Let Me Say This about this [Seite 307]
6.4.1 - Passing an Object to a Method [Seite 307]
6.4.2 - Defining Methods [Seite 309]
6.4.2.1 - Defining a static method [Seite 310]
6.4.2.2 - Defining an instance method [Seite 311]
6.4.2.3 - Expanding a method's full name [Seite 313]
6.4.3 - Accessing the Current Object [Seite 314]
6.4.3.1 - What is the this keyword? [Seite 316]
6.4.3.2 - When is this explicit? [Seite 317]
6.4.3.3 - What happens when you don't have this? [Seite 320]
6.4.4 - Using Local Functions [Seite 322]
6.5 - Chapter 5 Holding a Class Responsible [Seite 325]
6.5.1 - Restricting Access to Class Members [Seite 325]
6.5.1.1 - A public example of public BankAccount [Seite 326]
6.5.1.2 - Jumping ahead - other levels of security [Seite 329]
6.5.2 - Why You Should Worry about Access Control [Seite 330]
6.5.2.1 - Accessor methods [Seite 331]
6.5.2.2 - Access control to the rescue - an example [Seite 331]
6.5.2.3 - So what? [Seite 335]
6.5.3 - Defining Class Properties [Seite 336]
6.5.3.1 - Static properties [Seite 337]
6.5.3.2 - Properties with side effects [Seite 338]
6.5.3.3 - Letting the compiler write properties for you [Seite 338]
6.5.3.4 - Accessors with access levels [Seite 339]
6.5.4 - Getting Your Objects Off to a Good Start - Constructors [Seite 339]
6.5.5 - The C#-Provided Constructor [Seite 340]
6.5.6 - Replacing the Default Constructor [Seite 341]
6.5.6.1 - Constructing something [Seite 343]
6.5.6.2 - Initializing an object directly with an initializer [Seite 345]
6.5.6.3 - Seeing that construction stuff with initializers [Seite 346]
6.5.6.4 - Initializing an object without a constructor [Seite 347]
6.5.7 - Using Expression-Bodied Members [Seite 348]
6.5.7.1 - Creating expression-bodied methods [Seite 349]
6.5.7.2 - Defining expression-bodied properties [Seite 349]
6.5.7.3 - Defining expression-bodied constructors and destructors [Seite 349]
6.5.7.4 - Defining expression-bodied property accessors [Seite 350]
6.5.7.5 - Defining expression-bodied event accessors [Seite 350]
6.6 - Chapter 6 Inheritance: Is That All I Get? [Seite 353]
6.6.1 - Class Inheritance [Seite 354]
6.6.2 - Why You Need Inheritance [Seite 356]
6.6.3 - Inheriting from a BankAccount Class (a More Complex Example) [Seite 357]
6.6.4 - IS_A versus HAS_A - I'm So Confused_A [Seite 360]
6.6.4.1 - The IS_A relationship [Seite 361]
6.6.4.2 - Gaining access to BankAccount by using containment [Seite 362]
6.6.4.3 - The HAS_A relationship [Seite 363]
6.6.5 - When to IS_A and When to HAS_A [Seite 364]
6.6.6 - Other Features That Support Inheritance [Seite 364]
6.6.6.1 - Substitutable classes [Seite 365]
6.6.6.2 - Invalid casts at runtime [Seite 365]
6.6.6.3 - Avoiding invalid conversions with the is operator [Seite 366]
6.6.6.4 - Avoiding invalid conversions with the as operator [Seite 367]
6.6.7 - The object Class [Seite 368]
6.6.8 - Inheritance and the Constructor [Seite 369]
6.6.8.1 - Invoking the default base class constructor [Seite 370]
6.6.8.2 - Passing arguments to the base class constructor [Seite 371]
6.6.8.3 - Getting specific with base [Seite 373]
6.6.9 - The Updated BankAccount Class [Seite 374]
6.7 - Chapter 7 Poly-what-ism? [Seite 381]
6.7.1 - Overloading an Inherited Method [Seite 382]
6.7.1.1 - It's a simple case of method overloading [Seite 382]
6.7.1.2 - Different class, different method [Seite 383]
6.7.1.3 - Peek-a-boo - hiding a base class method [Seite 383]
6.7.1.4 - Calling back to base [Seite 388]
6.7.2 - Polymorphism [Seite 390]
6.7.2.1 - Using the declared type every time (Is that so wrong?) [Seite 392]
6.7.2.2 - Using is to access a hidden method polymorphically [Seite 393]
6.7.2.3 - Declaring a method virtual and overriding it [Seite 395]
6.7.2.4 - Getting the most benefit from polymorphism [Seite 398]
6.7.3 - The Class Business Card: ToString() [Seite 398]
6.7.4 - C# During Its Abstract Period [Seite 398]
6.7.4.1 - Class factoring [Seite 399]
6.7.4.2 - The abstract class: Left with nothing but a concept [Seite 404]
6.7.4.3 - How do you use an abstract class? [Seite 405]
6.7.4.4 - Creating an abstract object - not! [Seite 407]
6.7.5 - Sealing a Class [Seite 407]
6.8 - Chapter 8 Interfacing with the Interface [Seite 409]
6.8.1 - Introducing CAN_BE_USED_AS [Seite 409]
6.8.2 - Knowing What an Interface Is [Seite 411]
6.8.2.1 - How to implement an interface [Seite 412]
6.8.2.2 - How to name your interface [Seite 413]
6.8.2.3 - Why C# includes interfaces [Seite 413]
6.8.2.4 - Mixing inheritance and interface implementation [Seite 413]
6.8.2.5 - And he-e-e-re's the payoff [Seite 414]
6.8.3 - Using an Interface [Seite 415]
6.8.3.1 - As a method return type [Seite 415]
6.8.3.2 - As the base type of an array or collection [Seite 415]
6.8.3.3 - As a more general type of object reference [Seite 416]
6.8.4 - Using the C# Predefined Interface Types [Seite 416]
6.8.5 - Looking at a Program That CAN_BE_USED_AS an Example [Seite 417]
6.8.5.1 - Creating your own interface at home in your spare time [Seite 417]
6.8.5.2 - Implementing the incomparable IComparable interface [Seite 419]
6.8.5.3 - Putting it all together [Seite 420]
6.8.5.4 - Getting back to the Main() event [Seite 424]
6.8.6 - Unifying Class Hierarchies [Seite 425]
6.8.7 - Hiding Behind an Interface [Seite 427]
6.8.8 - Inheriting an Interface [Seite 430]
6.8.9 - Using Interfaces to Manage Change in Object-Oriented Programs [Seite 431]
6.8.9.1 - Making flexible dependencies through interfaces [Seite 432]
6.8.9.2 - Abstract or concrete: When to use an abstract class and when to use an interface [Seite 432]
6.8.9.3 - Doing HAS_A with interfaces [Seite 433]
6.9 - Chapter 9 Delegating Those Important Events [Seite 435]
6.9.1 - E.T., Phone Home - The Callback Problem [Seite 436]
6.9.2 - Defining a Delegate [Seite 436]
6.9.3 - Pass Me the Code, Please - Examples [Seite 438]
6.9.3.1 - Delegating the task [Seite 439]
6.9.3.2 - First, a simple example [Seite 439]
6.9.4 - A More Real-World Example [Seite 441]
6.9.4.1 - Getting an overview of the bigger example [Seite 441]
6.9.4.2 - Putting the app together [Seite 442]
6.9.4.3 - Looking at the code [Seite 445]
6.9.4.4 - Tracking the delegate life cycle [Seite 447]
6.9.5 - Shh! Keep It Quiet - Anonymous Methods [Seite 450]
6.9.6 - Stuff Happens - C# Events [Seite 451]
6.9.6.1 - The Observer design pattern [Seite 451]
6.9.6.2 - What's an event? Publish/Subscribe [Seite 451]
6.9.6.3 - How a publisher advertises its events [Seite 452]
6.9.6.4 - How subscribers subscribe to an event [Seite 453]
6.9.6.5 - How to publish an event [Seite 453]
6.9.6.6 - How to pass extra information to an event handler [Seite 454]
6.9.6.7 - A recommended way to raise your events [Seite 455]
6.9.6.8 - How observers "handle" an event [Seite 456]
6.10 - Chapter 10 Can I Use Your Namespace in the Library? [Seite 459]
6.10.1 - Dividing a Single Program into Multiple Source Files [Seite 460]
6.10.2 - Dividing a Single Program into Multiple Assemblies [Seite 461]
6.10.2.1 - Executable or library? [Seite 461]
6.10.2.2 - Assemblies [Seite 462]
6.10.2.3 - Executables [Seite 463]
6.10.2.4 - Class libraries [Seite 463]
6.10.3 - Putting Your Classes into Class Libraries [Seite 464]
6.10.3.1 - Creating the projects for a class library [Seite 464]
6.10.3.2 - Creating a stand-alone class library [Seite 464]
6.10.3.3 - Adding a second project to an existing solution [Seite 466]
6.10.3.4 - Creating classes for the library [Seite 467]
6.10.3.5 - Using a test application to test a library [Seite 468]
6.10.4 - Going Beyond Public and Private: More Access Keywords [Seite 470]
6.10.4.1 - Internal: For CIA eyes only [Seite 470]
6.10.4.2 - Protected: Sharing with subclasses [Seite 473]
6.10.4.3 - Protected internal: Being a more generous protector [Seite 475]
6.10.5 - Putting Classes into Namespaces [Seite 476]
6.10.5.1 - Declaring a namespace [Seite 477]
6.10.5.2 - Relating namespaces to the access keyword story [Seite 479]
6.10.5.3 - Using fully qualified names [Seite 480]
6.11 - Chapter 11 Improving Productivity with Named and Optional Parameters [Seite 483]
6.11.1 - Exploring Optional Parameters [Seite 484]
6.11.1.1 - Reference types [Seite 486]
6.11.1.2 - Output parameters [Seite 488]
6.11.2 - Looking at Named Parameters [Seite 488]
6.11.3 - Dealing with Overload Resolution [Seite 489]
6.11.4 - Using Alternative Methods to Return Values [Seite 490]
6.11.4.1 - Working with out variables [Seite 490]
6.11.4.2 - Returning values by reference [Seite 491]
6.12 - Chapter 12 Interacting with Structures [Seite 493]
6.12.1 - Comparing Structures to Classes [Seite 494]
6.12.1.1 - Considering struct limits [Seite 494]
6.12.1.2 - Understanding the value type difference [Seite 494]
6.12.1.3 - Determining when to use struct versus class [Seite 495]
6.12.2 - Creating Structures [Seite 496]
6.12.2.1 - Defining a basic struct [Seite 496]
6.12.2.2 - Including common struct elements [Seite 497]
6.12.3 - Using Structures as Records [Seite 503]
6.12.3.1 - Managing a single record [Seite 503]
6.12.3.2 - Adding structures to arrays [Seite 504]
6.12.3.3 - Overriding methods [Seite 505]
7 - Book 3 Designing for C# [Seite 507]
7.1 - Chapter 1 Writing Secure Code [Seite 509]
7.1.1 - Designing Secure Software [Seite 510]
7.1.1.1 - Determining what to protect [Seite 510]
7.1.1.2 - Documenting the components of the program [Seite 510]
7.1.1.3 - Decomposing components into functions [Seite 511]
7.1.1.4 - Identifying potential threats in functions [Seite 511]
7.1.1.5 - Rating the risk [Seite 512]
7.1.2 - Building Secure Windows Applications [Seite 512]
7.1.2.1 - Authentication using Windows login [Seite 513]
7.1.2.2 - Encrypting information [Seite 516]
7.1.2.3 - Deployment security [Seite 517]
7.1.3 - Building Secure Web Forms Applications [Seite 517]
7.1.3.1 - SQL Injection attacks [Seite 518]
7.1.3.2 - Script exploits [Seite 519]
7.1.3.3 - Best practices for securing Web Forms applications [Seite 521]
7.1.4 - Using System.Security [Seite 522]
7.2 - Chapter 2 Accessing Data [Seite 523]
7.2.1 - Getting to Know System.Data [Seite 524]
7.2.2 - How the Data Classes Fit into the Framework [Seite 526]
7.2.3 - Getting to Your Data [Seite 526]
7.2.4 - Using the System.Data Namespace [Seite 527]
7.2.4.1 - Setting up a sample database schema [Seite 527]
7.2.4.2 - Connecting to a data source [Seite 528]
7.2.4.3 - Working with the visual tools [Seite 534]
7.2.4.4 - Writing data code [Seite 537]
7.2.4.5 - Using the Entity Framework [Seite 540]
7.3 - Chapter 3 Fishing the File Stream [Seite 545]
7.3.1 - Going Where the Fish Are: The File Stream [Seite 545]
7.3.1.1 - Streams [Seite 546]
7.3.1.2 - Readers and writers [Seite 546]
7.3.2 - StreamWriting for Old Walter [Seite 548]
7.3.2.1 - Using the stream: An example [Seite 549]
7.3.2.2 - Revving up a new outboard StreamWriter [Seite 552]
7.3.2.3 - Finally, you're writing! [Seite 555]
7.3.2.4 - Using some better fishing gear: The using statement [Seite 556]
7.3.3 - Pulling Them Out of the Stream: Using StreamReader [Seite 560]
7.3.4 - More Readers and Writers [Seite 564]
7.3.5 - Exploring More Streams than Lewis and Clark [Seite 566]
7.4 - Chapter 4 Accessing the Internet [Seite 567]
7.4.1 - Getting to Know System.Net [Seite 568]
7.4.2 - How Net Classes Fit into the Framework [Seite 569]
7.4.3 - Using the System.Net Namespace [Seite 571]
7.4.3.1 - Checking the network status [Seite 571]
7.4.3.2 - Downloading a file from the Internet [Seite 573]
7.4.3.3 - Emailing a status report [Seite 576]
7.4.3.4 - Logging network activity [Seite 579]
7.5 - Chapter 5 Creating Images [Seite 583]
7.5.1 - Getting to Know System.Drawing [Seite 584]
7.5.1.1 - Graphics [Seite 584]
7.5.1.2 - Pens [Seite 585]
7.5.1.3 - Brushes [Seite 585]
7.5.1.4 - Text [Seite 585]
7.5.2 - How the Drawing Classes Fit into the Framework [Seite 587]
7.5.3 - Using the System.Drawing Namespace [Seite 588]
7.5.3.1 - Getting started [Seite 588]
7.5.3.2 - Setting up the project [Seite 589]
7.5.3.3 - Handling the score [Seite 590]
7.5.3.4 - Creating an event connection [Seite 591]
7.5.3.5 - Drawing the board [Seite 592]
7.5.3.6 - Starting a new game [Seite 594]
7.6 - Chapter 6 Programming Dynamically! [Seite 595]
7.6.1 - Shifting C# Toward Dynamic Typing [Seite 596]
7.6.2 - Employing Dynamic Programming Techniques [Seite 598]
7.6.3 - Putting Dynamic to Use [Seite 600]
7.6.3.1 - Classic examples [Seite 601]
7.6.3.2 - Making static operations dynamic [Seite 601]
7.6.3.3 - Understanding what's happening under the covers [Seite 602]
7.6.4 - Running with the Dynamic Language Runtime [Seite 603]
7.6.4.1 - Dynamic Ruby [Seite 604]
7.6.4.2 - Dynamic C# [Seite 605]
8 - Book 4 A Tour of Visual Studio [Seite 607]
8.1 - Chapter 1 Getting Started with Visual Studio [Seite 609]
8.1.1 - Versioning the Versions [Seite 610]
8.1.1.1 - Community edition [Seite 610]
8.1.1.2 - Professional edition [Seite 612]
8.1.1.3 - Enterprise edition [Seite 613]
8.1.1.4 - MSDN [Seite 614]
8.1.2 - Installing Visual Studio [Seite 614]
8.1.3 - Breaking Down the Projects [Seite 616]
8.1.3.1 - Exploring the New Project dialog box [Seite 617]
8.1.3.2 - Understanding solutions and projects [Seite 618]
8.2 - Chapter 2 Using the Interface [Seite 621]
8.2.1 - Designing in the Designer [Seite 621]
8.2.1.1 - Windows Presentation Foundation (WPF) [Seite 622]
8.2.1.2 - Windows Forms [Seite 624]
8.2.1.3 - Web Forms [Seite 625]
8.2.1.4 - Class Designer [Seite 626]
8.2.2 - Paneling the Studio [Seite 629]
8.2.2.1 - Solution Explorer [Seite 629]
8.2.2.2 - Properties [Seite 632]
8.2.2.3 - The Toolbox [Seite 633]
8.2.2.4 - Server Explorer [Seite 634]
8.2.2.5 - Class View [Seite 636]
8.2.3 - Coding in the Code Editor [Seite 636]
8.2.3.1 - Exercising the Code Editor [Seite 637]
8.2.3.2 - Exploring the auxiliary windows [Seite 638]
8.2.4 - Using the Tools of the Trade [Seite 640]
8.2.4.1 - The Tools menu [Seite 640]
8.2.4.2 - Building [Seite 642]
8.2.5 - Using the Debugger as an Aid to Learning [Seite 642]
8.2.5.1 - Stepping through code [Seite 642]
8.2.5.2 - Going to a particular code location [Seite 643]
8.2.5.3 - Watching application data [Seite 644]
8.2.5.4 - Viewing application internals [Seite 645]
8.3 - Chapter 3 Customizing Visual Studio [Seite 647]
8.3.1 - Setting Options [Seite 648]
8.3.1.1 - Environment [Seite 649]
8.3.1.2 - Language [Seite 650]
8.3.1.3 - Neat stuff [Seite 651]
8.3.2 - Using Snippets [Seite 652]
8.3.2.1 - Using snippets [Seite 652]
8.3.2.2 - Using surround snippets [Seite 654]
8.3.2.3 - Making snippets [Seite 655]
8.3.2.4 - Deploying snippets [Seite 656]
8.3.2.5 - Sharing snippets [Seite 657]
8.3.3 - Hacking the Project Types [Seite 658]
8.3.3.1 - Hacking project templates [Seite 658]
8.3.3.2 - Hacking item templates [Seite 662]
9 - Book 5 Windows Development with WPF [Seite 665]
9.1 - Chapter 1 Introducing WPF [Seite 667]
9.1.1 - Understanding What WPF Can Do [Seite 667]
9.1.2 - Introducing XAML [Seite 669]
9.1.3 - Diving In! Creating Your First WPF Application [Seite 670]
9.1.3.1 - Declaring an application-scoped resource [Seite 672]
9.1.3.2 - Making the application do something [Seite 673]
9.1.4 - Whatever XAML Can Do, C# Can Do Better! [Seite 675]
9.2 - Chapter 2 Understanding the Basics of WPF [Seite 677]
9.2.1 - Using WPF to Lay Out Your Application [Seite 678]
9.2.2 - Arranging Elements with Layout Panels [Seite 679]
9.2.2.1 - The Stack Panel [Seite 679]
9.2.2.2 - The Wrap Panel [Seite 681]
9.2.2.3 - The Dock Panel [Seite 682]
9.2.2.4 - Canvas [Seite 683]
9.2.2.5 - The Uniform Grid [Seite 684]
9.2.2.6 - The Grid [Seite 685]
9.2.2.7 - Putting it all together with a simple data entry form [Seite 692]
9.2.2.8 - Panels of honorable mention [Seite 694]
9.2.3 - Exploring Common XAML Controls [Seite 695]
9.2.3.1 - Display-only controls [Seite 695]
9.2.3.2 - Basic input controls [Seite 697]
9.2.3.3 - List-based controls [Seite 700]
9.3 - Chapter 3 Data Binding in WPF [Seite 705]
9.3.1 - Getting to Know Dependency Properties [Seite 705]
9.3.2 - Exploring the Binding Modes [Seite 706]
9.3.3 - Investigating the Binding Object [Seite 707]
9.3.3.1 - Defining a binding with XAML [Seite 707]
9.3.3.2 - Defining a binding with C# [Seite 710]
9.3.4 - Editing, Validating, Converting, and Visualizing Your Data [Seite 711]
9.3.4.1 - Validating data [Seite 716]
9.3.4.2 - Converting your data [Seite 720]
9.3.5 - Finding Out More about WPF Data Binding [Seite 728]
9.4 - Chapter 4 Practical WPF [Seite 729]
9.4.1 - Commanding Attention [Seite 729]
9.4.1.1 - Traditional event handling [Seite 730]
9.4.1.2 - ICommand [Seite 731]
9.4.1.3 - Routed commands [Seite 732]
9.4.2 - Using Built-In Commands [Seite 732]
9.4.3 - Using Custom Commands [Seite 735]
9.4.3.1 - Defining the interface [Seite 735]
9.4.3.2 - Creating the window binding [Seite 736]
9.4.3.3 - Ensuring that the command can execute [Seite 737]
9.4.3.4 - Performing the task [Seite 738]
9.4.4 - Using Routed Commands [Seite 740]
9.4.4.1 - Defining the Command class [Seite 740]
9.4.4.2 - Making the namespace accessible [Seite 740]
9.4.4.3 - Adding the command bindings [Seite 741]
9.4.4.4 - Developing a user interface [Seite 741]
9.4.4.5 - Developing the custom command code behind [Seite 742]
10 - Book 6 Web Development with ASP.NET [Seite 745]
10.1 - Chapter 1 Looking at How ASP.NET Works with C# [Seite 747]
10.1.1 - Breaking Down Web Applications [Seite 748]
10.1.2 - Questioning the Client [Seite 750]
10.1.2.1 - Scripting the client [Seite 751]
10.1.2.2 - Getting information back from the client [Seite 752]
10.1.2.3 - Understanding the weaknesses of the browser [Seite 752]
10.1.3 - Dealing with Web Servers [Seite 754]
10.1.3.1 - Getting a PostBack (Hint: It's not a returned package) [Seite 755]
10.1.3.2 - It's a matter of state [Seite 758]
10.2 - Chapter 2 Building Web Applications [Seite 759]
10.2.1 - Working in Visual Studio [Seite 760]
10.2.1.1 - Two project approaches [Seite 760]
10.2.1.2 - Creating a standard project [Seite 761]
10.2.1.3 - Creating a website [Seite 772]
10.2.2 - Developing with Style [Seite 773]
10.2.2.1 - Coding behind [Seite 774]
10.2.2.2 - Building in n-tier [Seite 775]
10.2.2.3 - Modeling the View Controller [Seite 776]
10.3 - Chapter 3 Controlling Your Development Experience [Seite 777]
10.3.1 - Showing Stuff to the User [Seite 778]
10.3.1.1 - Labels versus plain old text [Seite 778]
10.3.1.2 - Images [Seite 781]
10.3.1.3 - Panels and multiviews [Seite 782]
10.3.1.4 - Tables [Seite 783]
10.3.2 - Getting Some Input from the User [Seite 784]
10.3.2.1 - Using text input controls [Seite 784]
10.3.2.2 - Using single-item selection controls [Seite 786]
10.3.2.3 - Using multiple-item selection controls [Seite 788]
10.3.2.4 - Using other kinds of input controls [Seite 790]
10.3.2.5 - Submitting input with submit buttons [Seite 790]
10.3.3 - Data Binding [Seite 791]
10.3.3.1 - Setting up your markup for binding [Seite 791]
10.3.3.2 - Data binding using the code-behind [Seite 795]
10.3.3.3 - Using commonly bound controls [Seite 797]
10.3.4 - Styling Your Controls [Seite 799]
10.3.4.1 - Setting control properties [Seite 799]
10.3.4.2 - Binding styles with CSS [Seite 800]
10.3.5 - Making Sure the Site Is Accessible [Seite 801]
10.3.6 - Constructing User Controls [Seite 803]
10.3.6.1 - Making a new phone number User Control [Seite 803]
10.3.6.2 - Using your new control [Seite 804]
10.4 - Chapter 4 Leveraging the .NET Framework [Seite 807]
10.4.1 - Surfing Web Streams [Seite 808]
10.4.1.1 - Intercepting the request [Seite 808]
10.4.1.2 - Altering content sent to clients [Seite 812]
10.4.2 - Securing ASP.NET [Seite 813]
10.4.2.1 - Changing trusts [Seite 814]
10.4.2.2 - Fixing problems [Seite 814]
10.4.3 - Managing Files [Seite 815]
10.4.4 - Baking Cookies [Seite 816]
10.4.4.1 - Coding for client-side storage [Seite 817]
10.4.4.2 - How ASP.NET manages cookies for you [Seite 819]
10.4.5 - Tracing with TraceContext [Seite 820]
10.4.6 - Navigating with Site Maps [Seite 822]
10.4.6.1 - Navigating a site with SiteMap [Seite 824]
11 - Index [Seite 825]
12 - EULA [Seite 867]