If Activity
This is a conditional activity just like you have
If Else
blocks in your
application. You can have a branch of activities based on a certain condition.
Namespace System.Activities
Steps:
1). Start VS2010
2). Go to File Menu
Select New Project then select Workflow Console Application.
3). In this project
workflow1.xaml file will be seen.
4). From the toolbox,
Drag the Sequence Activity from the Control Flow tab.
5). Now Drag assign and writeline activity.
6). After that we can drag if activity from control
flow on sequence and set the condition if condition is true i.e. then is
executed and else is executed.
The Workflow is look like this:
Output