Convert string into if condition

hey
I’m trying to convert “conditional string” into an actual condition
for instance -
str=“4<4”
if(str) than …

any ideas?

@Lidor_Markovich
please use string.contains

Hey @Lidor_Markovich,

There you cannot campare two string with < or > signs, if you are getting that numeric value in the form of string you can convert those values to int32 and do the comparison.

Use string.contains or str.equal methods.

Thanks,
SANJIT

we would understand from this that you are looking for a solution to get evaluated / executed code in string format as an expression.

Depending on your case complexitiy solutions can range

from

  • quickly implementing simple expression strings handling

to

  • using Code evaluation / execution helpers

have a look here also