A Walkthrough of the Challenges from The C# Player's Guide, Fifth Edition by RB Whitaker.
- Consolas and Telim (p26): Basic I/O
- The Thing Namer 3000 (p31): Comments and code cleanup
- Clay's Converter (no page#): Convert string->int with multiple methods
- The Triangle Farmer (p53): calculate area of triangle
- The Four Sisters and the Duckbear (p56): Using modulo operator
- The Dominion of Kings (p57): Multiple inputs
- Defense of Consolas (p68): Text game to surround Blimp attacking city
- Repairing the Clocktower (p75): "Tick/Tock" on even/odd numbers.
- Watchtower (p78): Calculate coordinates for (x,y) from 3x3 grid.
- Buying Inventory (p82): Use Switch to display Inventory prices
- Discounted Inventory (p83): Ask user their name and apply 50% discount if name==user
- The Prototype (p88): Hi-Lo game
- The Magic Cannon (p89): Fizz-Buzz
- The Replicator of D'To (p94): Array Copy program
- The Laws of Freach (p95): Rewrite Min() and Average() to use foreach
- Taking a Number (p106): Helper methods with arguments
- Countdown (p107): Countdown from 10 to 1 using recursion instead of iteration
- Manticore Challenge (p124-125 & 249 "The Robot Pilot"): Fight the Manticore game incorporating later challenge ("The Robot Pilot") on p249 that asks us to use a random number generator to set the Manticore's starting position.
- Simula's Test (p135): Simulate a locked/unlocked/open/closed treasure chest.
- Simula's Soup (p143): Use three (3) enums to construct a tuple.
Lessons Learned for dotnet cli
dotnet new console -n <new projct name>- create new projectdotnet sln list- list all projectsdotnet run- runs project in current directorydotnet run --project <project name> (e.g. helloWorld)- run specific projectdotnet sln add <new_project.csproj- add new project to solution (e.g.dotnet sln add .\Lvl10_Switches\Lvl10_Switches.csproj) from main Solution Directory
- If I make a new project is VSCode and push it to Github, I must still add it as a new (existing)
project in Visual Studio using
Add -> Existing Project...in Solution Explorer.