I have a variable var=“My Place”
- need to check whether it contains double quotes or not?
so, I was using if condition like- var.Contains(“”")
-It’s not working either. - then I need to replace it with space-
So please help me.
Thanks in Advance
I have a variable var=“My Place”
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
but if condition is not working with var.Contains(“”“”)
No need even if there are no " in string your replace will be worked