How to replace double quotes from variable

I have a variable var=“My Place”

  1. need to check whether it contains double quotes or not?
    so, I was using if condition like- var.Contains(""")
    -It’s not working either.
  2. then I need to replace it with space-

So please help me.

Thanks in Advance

Hi,

You need to check it as the following condition.

var.Contains("""")

BTW, You can directly use Replace method without checking in advance.

var.Replace(""""," ")

Regards,

Thanks @Yoichi

1 Like

but if condition is not working with var.Contains("""")

Hi,

Can you check the following sample?

Main.xaml (5.6 KB)

We can also use chr(34).

Regards,

1 Like

No need even if there are no " in string your replace will be worked