String1 = String2 or String3

Hello all,

I am adding into an IF activity a condition to compare 3 different strings. How do i enter the condition correctly?

strSupplierTitle.Equals(strCompanyName) or strSupplierTitle.Equals(strCompanyName2)


Thank you

1 Like

If you want to do this more DRY
And don’t want to repeat yourself especially if you want do something like comparing more then two computer names, you might consider:

{strCompanyName, strCompanyName}.Contains(strSupplierTitle)
1 Like

Thanks, will give it a try

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