I am struggling to check for a " in a string in vb.net. Could anybody suggest a way to look for " in string as we do in c# using " \" "
I have tried with, \" and "" but of no use.
If partnerItem.Contains("*") Or partnerItem.Contains(""") Then
isBad = True
reportError(i + 1, colDetails(0), colDetails(1), "Field cannot contain " & PARTNER_ITEM_INVALID_CHARACTERS & " characters.")
... partnerItem.Contains("""") ...
I believe VB.Net escapes double-quotes with double-quotes. Thanks to the code-coloring on this site, your syntax is correctly highlighted with this change.
If partnerItem.Contains("*") Or partnerItem.Contains("""") Then
isBad = True
reportError(i + 1, colDetails(0), colDetails(1), "Field cannot contain " & PARTNER_ITEM_INVALID_CHARACTERS & " characters.")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With