Equals method not returning true even through two strings are same

I’m trying to compare two strings using Equals method but they are not true returning true and when i print those two variables in else block ,it’s returning the same output


image

Any suggestions please

Hi @Alekhya_Kalakurthi ,

Could you try this instead?

CurrentRow("AccountNumber").ToString.Trim.Equals(Account_Number(0).ToString.Trim)

Kind Regards,
Ashwin A.K

@ashwin.ashok Thank you so much. It worked

From 1 hour i have been trying ,used trim for only one string and it didn’t worked and tried other ways too. Finally i posted here, It worked .thank you so much Ashwin :slight_smile:

1 Like

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