Table Of ContentIt is illegal to redistribute this digital book. Please
do not share this file via email, websites, or any
other means. Be mindful about where you store it
and who might gain access to it.
The digital format of this book is only legally
distributed via https://gumroad.com/l/oKNdk. If
you have received this book through any other
means, please report it to
[email protected].
You may make any copies you need for your own
personal use.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and the author and
publisher were aware of those claims, those designations have been printed with initial capital
letters or in all capitals.
The author and publisher of this book have made every effort to ensure that this book’s
information was correct at press time. However, the author and publisher do not assume and
hereby disclaim any liability to any party for any loss, damage, or disruption caused by errors
or omissions, whether such errors or omissions result from negligence, accident, or any other
cause.
Copyright © 2012-2022 by RB Whitaker
All rights reserved. No part of this book may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying, recording, or by any
information storage and retrieval system, without written permission from the author, except
for the inclusion of brief quotations in a review. For information regarding permissions, write
to:
RB Whitaker
[email protected]
ISBN-13: 978-0-9855801-5-5
Starbound Software
Part 1: The Basics
Page Name XP
✓
10 Knowledge Check - C# 25
14 Install Visual Studio 75
19 Hello, World! 50
24 What Comes Next 50
24 The Makings of a Programmer 50
26 Consolas and Telim 50
31 The Thing Namer 3000 100
37 Knowledge Check - Variables 25
45 The Variable Shop 100
45 The Variable Shop Returns 50
48 Knowledge Check - Type System 25
53 The Triangle Farmer 100
56 The Four Sisters and the Duckbear 100
57 The Dominion of Kings 100
68 The Defense of Consolas 200
75 Repairing the Clocktower 100
78 Watchtower 100
82 Buying Inventory 100
83 Discounted Inventory 50
88 The Prototype 100
89 The Magic Cannon 100
94 The Replicator of D’To 100
95 The Laws of Freach 50
106 Taking a Number 100
107 Countdown 100
123 Knowledge Check - Memory 25
124 Hunting the Manticore 250
Part 2: Object-Oriented Programming
Page Name XP
✓
131 Knowledge Check - Objects 25
135 Simula’s Test 100
143 Simula’s Soups 100
153 Vin Fletcher’s Arrows 100
162 Vin’s Trouble 50
168 The Properties of Arrows 100
173 Arrow Factories 100
191 The Point 75
191 The Color 100
191 The Card 100
192 The Locked Door 100
192 The Password Validator 100
193 Rock-Paper-Scissors 150
194 15-Puzzle 150
194 Hangman 150
195 Tic-Tac-Toe 300
205 Packing Inventory 150
Page Name XP
✓
209 Labeling Inventory 50
210 The Old Robot 200
217 Robotic Interface 75
225 Room Coordinates 50
231 War Preparations 100
240 Colored Items 100
242 The Fountain of Objects 500
244 Small, Medium, or Large 100
244 Pits 100
244 Maelstroms 100
245 Amaroks 100
245 Getting Armed 100
246 Getting Help 100
249 The Robot Pilot 50
251 Time in the Cavern 50
Page Name XP
255 Lists of Commands 75 ✓
398 The Great Humanizer 100
403 Knowledge Check - Compiling 25
Part 3: Advanced Features 408 Knowledge Check - .NET 25
413 Altar of Publication 100
✓ Page Name XP
269 Knowledge Check - Large Programs 25
270 The Feud 75 Part 4: The Endgame
270 Dueling Traditions 100
Page Name XP
276 Safer Number Crunching 50 ✓
419 Core Game: Building Character 300
278 Knowledge Check - Methods 25
420 Core Game: The True Programmer 100
278 Better Random 100
420 Core Game: Actions and Players 300
290 Exepti’s Game 100
421 Core Game: Attacks 200
295 The Sieve 100
421 Core Game: Damage and HP 150
301 Knowledge Check - Events 25
422 Core Game: Death 150
302 Charberry Trees 100
422 Core Game: Battle Series 150
307 Knowledge Check - Lambdas 25
422 Core Game: The Uncoded One 100
307 The Lambda Sieve 50
423 Core Game: The Player Decides 200
315 The Long Game 100
423 Expansion: The Game’s Status 100
324 The Potion Masters of Pattren 150
424 Expansion: Items 200
331 Knowledge Check - Operators 25
424 Expansion: Gear 300
331 Navigating Operand City 100
425 Expansion: Stolen Inventory 200
332 Indexing Operand City 75
426 Expansion: Vin Fletcher 200
332 Converting Directions to Offsets 50
426 Expansion: Attack Modifiers 200
341 Knowledge Check - Queries 25
426 Expansion: Damage Types 200
342 The Three Lenses 100
427 Expansion: Making it Yours ?
349 The Repeating Stream 150
428 Expansion: Restoring Balance 150
359 Knowledge Check - Async 25
359 Asynchronous Random Words 150
Part 5: Bonus Levels
360 Many Random Words 50
365 Uniter of Adds 75 Page Name XP
✓
366 The Robot Factory 100 441 Knowledge Check - Visual Studio 25
372 Knowledge Check - Unsafe Code 25 446 Knowledge Check - Compiler Errors 25
392 Knowledge Check - Other Features 25 451 Knowledge Check - Debugging 25
397 Colored Console 100
T C
ABLE OF ONTENTS
Acknowledgments xix
Introduction 1
The Great Game of Programming 1
Book Features 2
I Want Your Feedback 6
An Overview 6
PART 1: THE BASICS
1. The C# Programming Language 9
What is C#? 9
What is .NET? 10
2. Getting an IDE 11
A Comparison of IDEs 11
Installing Visual Studio 13
3. Hello World: Your First Program 15
Creating a New Project 15
A Brief Tour of Visual Studio 17
Compiling and Running Your Program 18
Syntax and Structure 19
Beyond Hello World 24
Compiler Errors, Debuggers, and Configurations 27
4. Comments 29
How to Make Good Comments 30