Using Procedural Activities
The sample uses the Sequence, Assign, If, While, Switch, TryCatch, and WriteLine activities to implement a guessing game. The guessing game selects a random number and the player has to guess that number. When the player submits an incorrect guess, the workflow provides a hint whether to guess higher or lower. If the player guesses the number in less than 7 attempts, a special congratulations is displayed to the user.
Custom Activities in this Sample
Reads a line of text from the console. This activity derives from the NativeActivity class and creates a bookmark that is resumed by the console application when a line is read.
To use this sample
Using Visual Studio 2010, open the GuessingGame.sln solution file.
To build the solution, press CTRL+SHIFT+B.
To run the solution, press CTRL+F5.
The samples may already be installed on your machine. Check for the following (default) directory before continuing.