September 2010
Intermediate to advanced
272 pages
5h 16m
English
In this task, we will create a guess number game in the Sequence activity. This task will also demonstrate the usage of the DoWhile and IfElse activities.
Create a Workflow Console Application and name it GuessNumberGameInSequence.
Create a new code file, name it ReadNumberActivity.cs, and fill the file with the following code:
using System; using System.Activities; namespace GuessNumberGameInSequence { public sealed class ReadNumberActivity : CodeActivity { public OutArgument<int> OutNumber { get; set; } protected override void Execute(CodeActivityContext context) { OutNumber.Set(context, Int32.Parse(Console.ReadLine())); ...