How do I increment a variable? var++ throws an error

I’d like to increment a counter variable, and usually you do that with something like var++, i++, etc.

According to the help page, The Assign Activity, it should be possible, but I don’t see any syntax.

In every language I’ve used outside of COBOL, there is a ++ operator.

In UIPath community edition, the Assign activity throws a compiler error “expression expected”.

variable = variable + 1

1 Like

the reason is a=a++ unary operator comes with C# and not with VB net
as uipath includes methods and functions from vb net, ++ operator wont work
rather we can mention like what @NotFranmax suggested
counter = counter + 1

Cheers @Robot.Builder.9001

1 Like

That’s what I wound up doing.

1 Like