0

Hey guys!

I need to use quotes inside a string variable... but I don't know how.
If I simply put double quotes at the start and at the end, the program interprets it as a closed interval, like if every quote is a string.

What can I do? I've searched here, but none of the results seems to be related with VB.net.

Thanks in advance!

2
Contributors
5
Replies
8
Views
6 Years
Discussion Span
Last Post by jlego
0

ways i know:

Dim strQuote As String = "text"""
result would be text"

Dim strQuote As String = "text" & Chr(34)
retsult would be text"

0

Nice.

I'll try add Chr(34) at the begin and at the end of the string, will see if it works.

Thanks for the quick response, I'll post here if works (:

0

ive read before that you can use html encoding. im not sure how that works tho

if the above doesnt work then do a google search for html encoding " vb.net

might help more

0

Don't need to search, worked perfectly.

Just added & Chr(34) at the end and at the begin:

Argumentos = "a" & " " & NomedoBackup & " " & Chr(34) & Perfil & "\Folder with spaces\" & Chr(34)

Easy solution that I'll never forget. Thank you!

Edited by RenanLazarotto: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.