A number guessing game using a flowchart
The flowchart was not invented in WF4. On the contrary, this type of diagram has a long history. The flowchart was first introduced by Frank Gilbreth in 1921 and he created a tool to use the flowchart in an industrial engineering curriculum.
As a programmer, you may already have experience in using a flowchart to draw an algorithm or process.
In this task, we will create a number guessing game using a flowchart. This task will also demonstrate the usage of the FlowDecision
activity.
How to do it...
Create a workflow project:
Create a Workflow Console Application and name it
GuessNumberGameInFlowChart
.reate a ReadNumberActivity to receive the guess number:
Create a new code file, name it
ReadNumberActivity.cs
, and fill the file with the following code:using System; using System.Activities; namespace GuessNumberGameInFlowChart { public sealed class ReadNumberActivity : CodeActivity { public OutArgument<int> OutNumber { get; set; }...