Error when checking string in a List of <strings>


I have a list of strings, a kind of forbidden words and I am trying to check if my emails contain any of these words. I used the solution provided by these topics ( Check string in a List<of Strings> , Check if Mail subject/body contains an item from list of strings ) but I have this error and I do not understand why.

Option strict on disallows late binding

Could you please help me on this ?

Thank you.

@melanie Can you send the Screenshot of the Activity Which shows this error?

you can loop through list of string and check the can pass the MailForEachloop.Subject.Contains(string.join("",listofStringVar))

if you want to check each string in list of string you can loop through the list of string and pass the value like this