If else condition is not working

If else condition is not working only else part is print .Can anyone help me?

changed Checked in to

checked in

because you did BusinessExceptionMEssage.ToLower so you should check for all lower case
@prashant1603765

1 Like

Hi @prashant1603765 ,

You are converting the value to lower, but in the Contains() there are upper case characters, Hence it is only moving to the else part

@prashant1603765

It should be like below.

     "already in checked in state"

Thanks to all. Issue resolved.
@supermanPunch @jack.chan @lakshman

2 Likes