Head First C#, 4th Edition

Book description

What will you learn from this book?

Dive into C# and create apps, user interfaces, games, and more using this fun and highly visual introduction to C#, .NET Core, and Visual Studio. With this completely updated guide, which covers C# 8.0 and Visual Studio 2019, beginning programmers like you will build a fully functional game in the opening chapter. Then you'll learn how to use classes and object-oriented programming, create 3D games in Unity, and query data with LINQ. And you'll do it all by solving puzzles, doing hands-on exercises, and building real-world applications. By the time you're done, you'll be a solid C# programmer--and you'll have a great time along the way!

What's so special about this book?

Based on the latest research in cognitive science and learning theory, Head First C# uses a visually rich format to engage your mind rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multisensory learning experience is designed for the way your brain really works.

Publisher resources

View/Submit Errata

Table of contents

  1. Intro: How to use this book
    1. Who is this book for?
      1. Who should probably avoid this book?
    2. We know what you’re thinking.
    3. And we know what your brain is thinking.
    4. Metacognition: thinking about thinking
    5. Here’s what WE did
    6. Here’s what YOU can do to bend your brain into submission
    7. README
    8. The technical review team
    9. Acknowledgments
      1. And finally...
    10. O’Reilly online learning
  2. 1. Start Building with C#: Build something great…fast!
    1. Why you should learn C#
      1. Visual Studio is your gateway to C#
      2. If you’re on Windows...
      3. If you’re on a Mac...
    2. Visual Studio is a tool for writing code and exploring C#
    3. Create your first project in Visual Studio
    4. Let’s build a game!
      1. Your animal matching game is a WPF app
    5. Here’s how you’ll build your game
    6. Create a WPF project in Visual Studio
      1. Visual Studio created a project folder full of files for you
    7. Use XAML to design your window
    8. Design the window for your game
    9. Set the window size and title with XAML properties
    10. Add rows and columns to the XAML grid
    11. Make the rows and columns equal size
    12. Add a TextBlock control to your grid
    13. Now you’re ready to start writing code for your game
    14. Generate a method to set up the game
    15. Finish your SetUpGame method
    16. Run your program
    17. Add your new project to source control
    18. The next step to build the game is handling mouse clicks
    19. Make your TextBlocks respond to mouse clicks
    20. Add the TextBlock_MouseDown code
    21. Make the rest of the TextBlocks call the same MouseDown event handler
    22. Finish the game by adding a timer
    23. Add a timer to your game’s code
    24. Use the debugger to troubleshoot the exception
    25. Add the rest of the code and finish the game
    26. Update your code in source control
    27. Even better ifs…
  3. 2. Dive into C#: Statements, Classes, and Code
    1. Let’s take a closer look at the files for a console app
      1. A statement performs one single action
    2. Two classes can be in the same namespace (and file!)
    3. Statements are the building blocks for your apps
    4. Your programs use variables to work with data
      1. Declare your variables
      2. Variables vary
      3. You need to assign values to variables before you use them
      4. A few useful types
    5. Generate a new method to work with variables
    6. Add code that uses operators to your method
    7. Use the debugger to watch your variables change
    8. Use operators to work with variables
    9. “if” statements make decisions
      1. if/else statements also do something if a condition isn’t true
    10. Loops perform an action over and over
      1. while loops keep looping statements while a condition is true
      2. do/while loops run the statements then check the condition
      3. for loops run a statement after each loop
    11. Use code snippets to help write loops
    12. Controls drive the mechanics of your user interfaces
    13. Create a WPF app to experiment with controls
    14. Add a TextBox control to your app
    15. Add C# code to update the TextBlock
    16. Add an event handler that only allows number input
    17. Add sliders to the bottom row of the grid
    18. Add C# code to make the rest of the controls work
  4. Unity Lab #1: Explore C# with Unity
    1. Unity is a powerful tool for game design
    2. Download Unity Hub
    3. Use Unity Hub to create a new project
    4. Make Visual Studio your Unity script editor
    5. Take control of the Unity layout
    6. Choose the Wide layout to match our screenshots
    7. Your scene is a 3D environment
    8. Unity games are made with GameObjects
    9. Use the Move Gizmo to move your GameObjects
    10. The Inspector shows your GameObject’s components
    11. Add a material to your Sphere GameObject
    12. Rotate your sphere
    13. Move the Scene view camera with the Hand tool and Scene Gizmo
    14. Get creative!
  5. 3. Objects…get oriented!: Making code make sense
    1. If code is useful, it gets reused
    2. Some methods take parameters and return a value
    3. Let’s build a program that picks some cards
    4. Create your PickRandomCards console app
    5. Finish your PickSomeCards method
    6. Your finished CardPicker class
    7. Ana’s working on her next game
      1. Ana’s game is evolving…
    8. Build a paper prototype for a classic game
    9. Up next: build a WPF version of your card picking app
    10. A StackPanel is a container that stacks other controls
    11. Reuse your CardPicker class in a new WPF app
    12. Use a Grid and StackPanel to lay out the main window
    13. Lay out your Card Picker desktop app’s window
      1. Ana’s prototypes look great…
      2. …but what if she wants more than one enemy?
    14. Ana can use objects to solve her problem
    15. You use a class to build an object
      1. An object gets its methods from its class
    16. When you create a new object from a class, it’s called an instance of that class
    17. A better solution for Ana…brought to you by objects
      1. Theory and practice
    18. An instance uses fields to keep track of things
      1. Methods are what an object does. Fields are what the object knows.
    19. Thanks for the memory
    20. What’s on your program’s mind
    21. Sometimes code can be difficult to read
      1. Extremely compact code can be especially problematic
      2. Most code doesn’t come with a manual
    22. Use intuitive class and method names
    23. Build a class to work with some guys
    24. There’s an easier way to initialize objects with C#
    25. Use the C# Interactive window to run C# code
  6. 4. Types and References: Getting the Reference
    1. Owen could use our help!
      1. Storytelling, fantasy, and mechanics
    2. Character sheets store different types of data on paper
    3. A variable’s type determines what kind of data it can store
    4. C# has several types for storing integers
      1. Types for storing really HUGE and really tiny numbers
    5. Let’s talk about strings
    6. A literal is a value written directly into your code
      1. Use suffixes to give your literals types
    7. A variable is like a data to-go cup
      1. Use the Convert class to explore bits and bytes
    8. Other types come in different sizes, too
    9. 10 pounds of data in a 5-pound bag
    10. Casting lets you copy values that C# can’t automatically convert to another type
      1. So what happened?
      2. When you cast a value that’s too big,C# adjusts it to fit its new container
    11. C# does some conversions automatically
    12. When you call a method, the arguments need to be compatible with the types of the parameters
      1. Owen is constantly improving his game…
      2. …but the trial and error can be time-consuming
    13. Let’s help Owen experiment with ability scores
    14. Use the C# compiler to find the problematic line of code
      1. Add a cast to get the AbilityScoreCalculator class to compile...
      2. …but there’s still a bug!
      3. And now we can finally fix Owen’s bug
    15. Use reference variables to access your objects
      1. References are like sticky notes for your objects
      2. If there aren’t any more references,your object gets garbage-collected
    16. Multiple references and their side effects
      1. Two references mean TWO variables that can change the same object’s data
    17. Objects use references to talk to each other
    18. Arrays hold multiple values
      1. Use each element in an array like it’s a normal variable
    19. Arrays can contain reference variables
    20. null means a reference points to nothing
    21. Welcome to Sloppy Joe’s Budget House o’ Discount Sandwiches!
  7. Unity Lab #2: Write C# Code for Unity
    1. C# scripts add behavior to your GameObjects
    2. Add a C# script to your GameObject
    3. Write C# code to rotate your sphere
    4. Add a breakpoint and debug your game
    5. Use a hit count to skip frames
    6. Use the debugger to understand Time.deltaTime
    7. Add a cylinder to show where the Y axis is
    8. Add fields to your class for the rotation angle and speed
    9. Use Debug.DrawRay to explore how 3D vectors work
    10. Use Unity to visualize vectors in 3D
    11. Run the game to see the ray in the Scene view
    12. Add a duration to the ray so it leaves a trail
    13. Rotate your ball around a point in the scene
    14. Use Unity to take a closer look at rotation and vectors
    15. Get creative!
  8. 5. Encapsulation: Keep your Privates… Private
    1. Let’s help Owen roll for damage
    2. Create a console app to calculate damage
    3. Design the XAML for a WPF version of the damage calculator
    4. The code-behind for the WPF damage calculator
    5. Tabletop talk (or maybe…dice discussion?)
    6. Let’s try to fix that bug
    7. Use Debug.WriteLine to print diagnostic information
    8. It’s easy to accidentally misuse your objects
    9. Encapsulation means keeping some of the data in a class private
    10. Use encapsulation to control access to your class’s methods and fields
    11. But is the RealName field REALLY protected?
    12. Private fields and methods can only be accessed from instances of the same class
    13. Why encapsulation? Think of an object as a black box…
      1. Encapsulation makes your classes…
      2. A few ideas for encapsulating classes
    14. Let’s use encapsulation to improve the SwordDamage class
      1. Is every member of the SwordDamage class public?
      2. Are fields or methods being misused?
      3. Is there calculation required after setting a field?
      4. So what fields and methods really need to be public?
    15. Encapsulation keeps your data safe
      1. Let’s use encapsulation in a class
    16. Write a console app to test the PaintballGun class
      1. Our class is well-encapsulated, but...
    17. Properties make encapsulation easier
      1. Replace the GetBalls and SetBalls methods with a property
    18. Modify your Main method to use the Balls property
      1. Debug your PaintballGun class to understand how the property works
    19. Auto-implemented properties simplify your code
      1. Use the prop snippet to create an auto-implemented property
    20. Use a private setter to create a read-only property
      1. Make the BallsLoaded setter private
    21. What if we want to change the magazine size?
      1. But there’s a problem…how do we initialize MagazineSize?
    22. Use a constructor with parameters to initialize properties
    23. Specify arguments when you use the “new” keyword
      1. A few useful facts about methods and properties
  9. 6. Inheritance: Your Object’s Family Tree
    1. Calculate damage for MORE weapons
    2. Use a switch statement to match several candidates
    3. One more thing...can we calculate damage for a dagger? and a mace? and a staff? and...
    4. When your classes use inheritance, you only need to write your code once
    5. Build up your class model by starting general and getting more specific
    6. How would you design a zoo simulator?
    7. Different animals have different behaviors
    8. Every subclass extends its base class
      1. C# always calls the most specific method
    9. Any place where you can use a base class, you can use one of its subclasses instead
    10. Use a colon to extend a base class
    11. We know that inheritance adds the base class fields, properties, and methods to the subclass...
      1. ...but some birds don’t fly!
    12. A subclass can override methods to change or replace members it inherited
    13. Some members are only implemented in a subclass
    14. Use the debugger to understand how overriding works
    15. Build an app to explore virtual and override
    16. A subclass can hide methods in the base class
      1. Hiding methods versus overriding methods
      2. Use the new keyword when you’re hiding methods
      3. Use different references to call hidden methods
    17. Use the override and virtual keywords to inherit behavior
    18. A subclass can access its base class using the base keyword
    19. When a base class has a constructor, your subclass needs to call it
    20. A subclass and base class can have different constructors
    21. It’s time to finish the job for Owen
    22. When your classes overlap as little as possible, that’s an important design principle called separation of concerns
      1. Use the debugger to really understand how these classes work
    23. Build a beehive management system
    24. The beehive management system class model
    25. The Queen class: how she manages the worker bees
    26. The UI: add the XAML for the main window
    27. Feedback drives your Beehive Management game
      1. Workers and honey are in a feedback loop
    28. The Beehive Management System is turn-based...now let’s convert it to real-time
    29. Some classes should never be instantiated
    30. An abstract class is an intentionally incomplete class
    31. Like we said, some classes should never be instantiated
      1. Solution: use an abstract class
    32. An abstract method doesn’t have a body
    33. Abstract properties work just like abstract methods
  10. Unity Lab #3: GameObject Instances
    1. Let’s build a game in Unity!
    2. Create a new material inside the Materials folder
    3. Spawn a billiard ball at a random point in the scene
    4. Use the debugger to understand Random.value
    5. Turn your GameObject into a prefab
    6. Create a script to control the game
    7. Attach the script to the Main Camera
    8. Press Play to run your code
    9. Watch the live instances in the Hierarchy window
    10. Use the Inspector to work with GameObject instances
    11. Use physics to keep balls from overlapping
    12. Get creative!
  11. 7. Interfaces, Casting, and “is”: Making Classes keep their Promises
    1. The beehive is under attack!
      1. So we need a DefendHive method, because enemies can attack at any time
    2. We can use casting to call the DefendHive method...
      1. ...but what if we add more Bee subclasses that can defend?
    3. An interface defines methods and properties that a class must implement...
      1. ...but there’s no limit to the number of interfaces a class can implement
    4. Interfaces let unrelated classes do the same job
    5. Get a little practice using interfaces
    6. You can’t instantiate an interface, but you can reference an interface
      1. If you try to instantiate an interface, your code won’t build
      2. Use the interface to reference an object you already have
    7. Interface references are ordinary object references
    8. The RoboBee 4000 can do a worker bee’s job without using valuable honey
    9. The IWorker’s Job property is a hack
    10. Use “is” to check the type of an object
    11. Use “is” to access methods in a subclass
    12. What if we want different animals to swim or hunt in packs?
    13. Use interfaces to work with classes that do the same job
      1. Use the “is” keyword to check if the Animal is a swimmer or pack hunter
    14. Safely navigate your class hierarchy with “is”
    15. C# has another tool for safe type conversion: the “as” keyword
    16. Use upcasting and downcasting to move up and down a class hierarchy
    17. A quick example of upcasting
    18. Upcasting turns your CoffeeMaker into an Appliance
    19. Downcasting turns your Appliance back into a CoffeeMaker
    20. Upcasting and downcasting work with interfaces, too
    21. Interfaces can inherit from other interfaces
    22. Interfaces can have static members
    23. Default implementations give bodies to interface methods
    24. Add a ScareAdults method with a default implementation
    25. Data binding updates WPF controls automatically
    26. Modify the Beehive Management System to use data binding
    27. Polymorphism means that one object can take many different forms
      1. Keep your eyes open for polymorphism!
      2. The four core principles of object-oriented programming
  12. 8. Enums and Collections: Organizing your Data
    1. Strings don’t always work for storing categories of data
    2. Enums let you work with a set of valid values
      1. An enum defines a new type
    3. Enums let you represent numbers with names
    4. We could use an array to create a deck of cards...
      1. ...but what if you wanted to do more?
    5. Arrays can be annoying to work with
    6. Lists make it easy to store collections of...anything
    7. Lists are more flexible than arrays
    8. Let’s build an app to store shoes
    9. Generic collections can store any type
      1. Generic lists are declared using <angle brackets>
    10. Collection initializers are similar to object initializers
    11. Let’s create a List of Ducks
      1. Here’s the initializer for your List of Ducks
    12. Lists are easy, but SORTING can be tricky
      1. Lists know how to sort themselves
    13. IComparable<Duck> helps your List sort its Ducks
      1. An object’s CompareTo method compares it to another object
    14. Use IComparer to tell your List how to sort
      1. Add an IComparer to your project
    15. Create an instance of your comparer object
      1. Multiple IComparer implementations, multiple ways to sort your objects
    16. Comparers can do complex comparisons
    17. Overriding a ToString method lets an object describe itself
      1. Override the ToString method to see your Ducks in the IDE
    18. Update your foreach loops to let your Ducks and Cards write themselves to the console
      1. Add a ToString method to your Card object, too
    19. You can upcast an entire list using IEnumerable<T>
    20. Use a Dictionary to store keys and values
    21. The Dictionary functionality rundown
      1. Your key and value can be different types
    22. Build a program that uses a dictionary
    23. And yet MORE collection types...
      1. Generic .NET collections implement IEnumerable
    24. A queue is FIFO—first in, first out
    25. A stack is LIFO—last in, first out
  13. Unity Lab #4: User Interfaces
    1. Add a score that goes up when the player clicks a ball
    2. Add two different modes to your game
    3. Add game mode to your game
    4. Add a UI to your game
    5. Use the 2D view to work with the Canvas
    6. Set up the Text that will display the score in the UI
    7. Add a button that calls a method to start the game
    8. Make the Play Again button and Score Text work
    9. Finish the code for the game
    10. Get creative!
  14. 9. LINQ and lambdas: Get control of your data
    1. Jimmy’s a Captain Amazing super-fan...
    2. ...but his collection’s all over the place
    3. Use LINQ to query your collections
    4. LINQ works with any IEnumerable<T>
      1. LINQ methods enumerate your sequences
    5. LINQ’s query syntax
      1. LINQ queries are built from clauses
    6. LINQ works with objects
    7. Use a LINQ query to finish the app for Jimmy
    8. The var keyword lets C# figure out variable types for you
      1. When you use var, C# figures out the variable’s type automatically
    9. LINQ is versatile
    10. LINQ queries aren’t run until you access their results
    11. Use a group query to separate your sequence into groups
    12. Use join queries to merge data from two sequences
    13. Use the new keyword to create anonymous types
    14. Unit tests help you make sure your code works
      1. Visual Studio for Windows has a Test Explorer window
      2. Visual Studio for Mac has the Unit Tests tool window
    15. Add a unit test project to Jimmy’s comic collection app
    16. Write your first unit test
    17. Write a unit test for the GetReviews method
    18. Write unit tests to handle edge cases and weird data
    19. Use the => operator to create lambda expressions
    20. A lambda test drive
    21. Refactor a clown with lambdas
    22. Use the ?: operator to make your lambdas make choices
    23. Lambda expressions and LINQ
      1. Use lambda expressions with methods that take a Func parameter
    24. LINQ queries can be written as chained LINQ methods
      1. The OrderBy LINQ method sorts a sequence
      2. The Where LINQ method pulls out a subset of a sequence
    25. Use the => operator to create switch expressions
    26. Explore the Enumerable class
      1. Enumerable.Empty creates an empty sequence of any type
      2. Enumerable.Repeat repeats a value a number of times
      3. So what exactly is an IEnumerable<T>?
    27. Create an enumerable sequence by hand
    28. Use yield return to create your own sequences
      1. Use the debugger to explore yield return
    29. Use yield return to refactor ManualSportSequence
      1. Add an indexer to BetterSportSequence
    30. Collectioncross
    31. Collectioncross Solution
  15. 10. Reading and writing files: Save the last byte for me!
    1. .NET uses streams to read and write data
    2. Different streams read and write different things
      1. Things you can do with a stream:
    3. A FileStream reads and writes bytes in a file
    4. Write text to a file in three simple steps
    5. The Swindler launches another diabolical plan
    6. StreamWriter Magnets
    7. StreamWriter Magnets Solution
    8. Use a StreamReader to read a file
    9. Data can go through more than one stream
    10. Pool Puzzle
    11. Pool Puzzle Solution
    12. Use the static File and Directory classes to work with files and directories
      1. Things you can do with the static File class:
      2. Things you can do with the static Directory class:
    13. IDisposable makes sure objects are closed properly
      1. Use the IDE to explore IDisposable
    14. Avoid filesystem errors with using statements
      1. Use multiple using statements for multiple objects
    15. Use a MemoryStream to stream data to memory
      1. Use Encoding.UTF8.GetString to convert byte arrays to strings
    16. What happens to an object when it’s serialized?
    17. But what exactly IS an object’s state? What needs to be saved?
    18. When an object is serialized, all of the objects it refers to get serialized, too...
    19. Use JsonSerialization to serialize your objects
    20. JSON only includes data, not specific C# types
    21. Next up: we’ll take a deep dive into our data
    22. C# strings are encoded with Unicode
    23. Visual Studio works really well with Unicode
    24. .NET uses Unicode to store characters and text
    25. C# can use byte arrays to move data around
    26. Use a BinaryWriter to write binary data
    27. Use BinaryReader to read the data back in
    28. A hex dump lets you see the bytes in your files
      1. How to make a hex dump of some plain text
    29. Use StreamReader to build a hex dumper
    30. Use Stream.Read to read bytes from a stream
    31. Modify your hex dumper to use command-line arguments
      1. Run your app from the command line
  16. Unity Lab #5: Raycasting
    1. Create a new Unity project and start to set up the scene
    2. Set up the camera
    3. Create a GameObject for the player
    4. Introducing Unity’s navigation system
    5. Set up the NavMesh
    6. Make your player automatically navigate the play area
  17. 11. Captain Amazing: The Death of the Object
    1. The life and death of an object
    2. Use the GC class (with caution) to force garbage collection
    3. Your last chance to DO something...your object’s finalizer
    4. When EXACTLY does a finalizer run?
      1. You can SUGGEST to .NET that it’s time to collect the garbage
    5. Finalizers can’t depend on other objects
      1. Don’t use finalizers for serialization
    6. A struct looks like an object...
      1. ...but isn’t an object
    7. Values get copied; references get assigned
    8. Structs are value types; objects are reference types
      1. Here’s what happened...
    9. The stack vs. the heap: more on memory
    10. Use out parameters to make a method return more than one value
    11. Pass by reference using the ref modifier
    12. Use optional parameters to set default values
    13. A null reference doesn’t refer to any object
    14. Non-nullable reference types help you avoid NREs
      1. Use encapsulation to prevent your property from ever being null
    15. The null-coalescing operator ?? helps with nulls
      1. ?? checks for null and returns an alternative
      2. ??= assigns a value to a variable only if it’s null
    16. Nullable value types can be null...and handled safely
    17. “Captain” Amazing...not so much
    18. Pool Puzzle
    19. Pool Puzzle Solution
    20. Extension methods add new behavior to EXISTING classes
    21. Extending a fundamental type: string
    22. Extension Magnets
    23. Extension Magnets Solution
  18. 12. Exception Handling: Putting out Fires Gets old
    1. Your hex dumper reads a filename from the command line
      1. But what happens if you give HexDump an invalid filename?
    2. When your program throws an exception, the CLR generates an Exception object
    3. All Exception objects inherit from System.Exception
    4. There are some files you just can’t dump
    5. What happens when a method you want to call is risky?
    6. Handle exceptions with try and catch
    7. Use the debugger to follow the try/catch flow
    8. If you have code that ALWAYS needs to run, use a finally block
    9. Catch-all exceptions handle System.Exception
      1. Avoid catch-all exception with multiple catch blocks
    10. Pool Puzzle
    11. Pool Puzzle Solution
    12. Use the right exception for the situation
      1. Catch custom exceptions that extend System.Exception
    13. Exception Magnets
    14. Exception Magnets Solution
    15. Exception filters help you create precise handlers
    16. The worst catch block EVER: catch-all plus comments
      1. You should handle your exceptions, not bury them
    17. Temporary solutions are OK (temporarily)
  19. Unity Lab #6 Scene Navigation
    1. Let’s pick up where the last Unity Lab left off
    2. Add a platform to your scene
    3. Use bake options to make the platform walkable
    4. Include the stairs and ramp in your NavMesh
    5. Fix height problems in the NavMesh
    6. Add a NavMesh Obstacle
    7. Add a script to move the obstacle up and down
    8. Get creative!
    9. Downloadable exercise: Animal match boss battle
    10. Thank you for reading our book!
    11. But wait, there’s more! Your journey’s just begun...
    12. And check out these essential (and amazing!) books by some of our friends and colleagues, also published by O’REILLY
  20. A. ASP.NET Core Blazor projects: Visual Studio for Mac Learner’s Guide
    1. Why you should learn C#
      1. Visual Studio is your gateway to C#
      2. Install .NET Core
      3. You can also use Visual Studio for Windows to build Blazor web applications
    2. Visual Studio is a tool for writing code and exploring C#
    3. Create your first project in Visual Studio for Mac
    4. Use the Visual Studio IDE to explore your app
    5. Let’s build a game!
      1. Your animal matching game is a Blazor WebAssembly app
    6. Here’s how you’ll build your game
    7. Create a Blazor WebAssembly App in Visual Studio
    8. Run your Blazor web app in a browser
    9. Now you’re ready to start writing code for your game
      1. How the page layout in your animal matching game will work
    10. Visual Studio helps you write C# code
    11. Finish creating your emoji list and display it in the app
      1. Replace the contents of the page
    12. Shuffle the animals so they’re in a random order
    13. You’re running your game in the debugger
    14. Add your new project to source control
    15. Add C# code to handle mouse clicks
    16. Add click event handlers to your buttons
      1. Here’s the code for the event handler
      2. Hook up your event handler to the buttons
    17. Test your event handler
      1. But what happens if you click on the same button twice?
    18. Use the debugger to troubleshoot the problem
    19. Keep debugging your event handler
    20. Track down the bug that’s causing the problem...
      1. ...and fix the bug!
    21. Add code to reset the game when the player wins
    22. Finish the game by adding a timer
    23. Add a timer to your game’s code
    24. Clean up the navigation menu
    25. Even better ifs...
    26. from Chapter 2 dive into C#
    27. Controls drive the mechanics of your user interfaces
    28. Create a new Blazor WebAssembly App project
    29. Create a page with a slider control
    30. Add a text input to your app
    31. Add color and date pickers to your app
    32. from Chapter 3 objects...get oriented!
    33. Up next: build a Blazor version of your card picking app
      1. Reuse your CardPicker class in a new Blazor app
    34. The page is laid out with rows and columns
    35. The slider uses data binding to update a variable
    36. from Chapter 4 types and references
      1. Welcome to Sloppy Joe’s Budget House o’ Discount Sandwiches!
  21. B. Code Kata Guide for the Advanced and/or Impatient
  22. Index

Product information

  • Title: Head First C#, 4th Edition
  • Author(s): Andrew Stellman, Jennifer Greene
  • Release date: December 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491976708