Description

Assigns a value to a variable or argument.



Attributes

  • DisplayName - Renames the activity.

  • To - The name of the variable whose value would be assigned to.

  • Value - The value to be assigned to the variable.


Example

  1. Create an Integer variable called number, with a Default value of 12.
  2. Add a Write Line activity, and in the Text field, write number.ToString. This is to display the initial value of the variable.
  3. Add an Assign activity.
  4. In the To field, add number.
  5. In the Value field, write number+2. This means to add 2 in the default value of the number variable.
  6. Add a Write Line activity, and in the Text field, write number.ToString again. 


            The use case should look as the following screenshot:



This should be the result in the Output panel: