How to use if condition for string that contain variable or not

how can i use any condition for string that contain a variable or not in if condition.

Hi @Alok_Dwivedi ,

Use below syntax
strVariable.Contains("dfsdf")
True-> sting value contains in the variable
False-> sting value not contains in the variable
Regards,
Arivu

@Alok_Dwivedi

use as @arivu96 said

But if it is variable no need of giving the " "

Hope this will help you

Thanks

In contains Bracket i have to pass variable.

@Alok_Dwivedi

write as below

YouStringVariable.Contains(VariabletoPass)

Hope this will help you

Thanks

Use this strVariable.Contains(strVar)

Regards,
Arivu

Thanks it is working.

1 Like

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