Once upon a time in the kingdom of , there lived a young apprentice named Codey . Codey wanted to build a Great Automaton—a machine that could do anything—but he didn’t know the secret language of the realm: C# .
DotNet handed Codey three jars. "These are ," he explained. "They hold the essence of your program." Fundamentals of Computer Programming with C# - ...
The first jar was labeled int —it could only hold solid stones (whole numbers). The second was string —it held scrolls of text. Once upon a time in the kingdom of
The third was bool —it held a light that was either glowing (true) or dark (false)."A program is just moving things between these jars," DotNet whispered. Chapter 2: The Fork in the Road (Conditions) "These are ," he explained
As Codey began to build, he reached a bridge guarded by a Stone Golem. The Golem had a sign: if (energy > 10) { Cross(); } else { Rest(); } .This was a . Codey checked his energy jar. It was at 15. Because the condition was True , the bridge lowered. If he had been tired, he would have been forced to stay and rest. Chapter 3: The Enchanted Treadmill (Loops)