Cannot run basic C# operators like AND/OR in my IF Activity in UiPath Studio

The condition i input for my if activity is simply Int_Var > 0 And Int_Var < 8

But the error I get is as below.

Thank you for your support.

; expected
This feature is not available in Studio yet. Only features up to C# language
version 5 are available.
Identifier expected
Syntax error,‘>’ expected
Syntax error, expected ) expected
Operator > cannot be applied to operands of type ‘method group’ and
Local function ‘Int_Var<>()’ must declare a body because it is not marked
‘static extern’.
Using the generic type ‘And< TLeft, TRight, TResult>’ requires 3 type Only assignment, call, increment, decrement, await, and new object
arguments expressions can be used as a statement


Can you try as the following?

Int_Var > 0 && Int_Var < 8


Thank you Yoichi,

It works perfectly, and i got the logic behind.

I was trying to run VB operators on a project with C# dependency.

I created one with VB now and the operators work, and if i want to use C#, i’ll use && instead of And.


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.