By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

How to display quotes

P: n/a
May 7, 2005

I am trying to output a " in a string, but I can't do it because a " is a
"keyword" by the VB intellisense. How can I represent a " so it is converted
when displayed? Something like str = ";quot c:\program files ;quot". A quick
response would be GREATLY appreciated! Thanks!

Joseph Bittman
Microsoft Certified Application Developer
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Just escape the quote by typing it twice: Dim X as String = ""To be or not
to be""
"Joseph MCAD" <Jo********@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
May 7, 2005

I am trying to output a " in a string, but I can't do it because a " is
a
"keyword" by the VB intellisense. How can I represent a " so it is
converted
when displayed? Something like str = ";quot c:\program files ;quot". A
quick
response would be GREATLY appreciated! Thanks!

Joseph Bittman
Microsoft Certified Application Developer

Nov 21 '05 #2

P: n/a
May 7, 2005

Thanks, but I haven't been able to get that method to work in a
different way. I actually am trying to do this...

process.arguments = "-v "" & name & """
^^ need to add assembly name, but need
quotes
It doesn't work though??

Joseph Bittman MCAD
"Scott M." wrote:
Just escape the quote by typing it twice: Dim X as String = ""To be or not
to be""
"Joseph MCAD" <Jo********@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
May 7, 2005

I am trying to output a " in a string, but I can't do it because a " is
a
"keyword" by the VB intellisense. How can I represent a " so it is
converted
when displayed? Something like str = ";quot c:\program files ;quot". A
quick
response would be GREATLY appreciated! Thanks!

Joseph Bittman
Microsoft Certified Application Developer


Nov 21 '05 #3

P: n/a
process.arguments = "-v """ & name & """"

Ralf
"Joseph MCAD" <Jo********@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
: May 7, 2005
:
: Thanks, but I haven't been able to get that method to work in a
: different way. I actually am trying to do this...
:
: process.arguments = "-v "" & name & """
: ^^ need to add assembly name, but
' need quotes
: It doesn't work though??
:
: Joseph Bittman MCAD
:
:
: "Scott M." wrote:
:
: > Just escape the quote by typing it twice: Dim X as String = ""To be
or not
: > to be""
: >
: >
: > "Joseph MCAD" <Jo********@discussions.microsoft.com> wrote in
message
: > news:D6**********************************@microsof t.com...
: > > May 7, 2005
: > >
: > > I am trying to output a " in a string, but I can't do it because
a " is
: > > a
: > > "keyword" by the VB intellisense. How can I represent a " so it is
: > > converted
: > > when displayed? Something like str = ";quot c:\program files
;quot". A
: > > quick
: > > response would be GREATLY appreciated! Thanks!
: > >
: > > Joseph Bittman
: > > Microsoft Certified Application
Developer
: >
: >
: >

Nov 21 '05 #4

P: n/a
"Joseph MCAD" <Jo********@discussions.microsoft.com> schrieb:
I am trying to output a " in a string, but I can't do it because a " is
a
"keyword" by the VB intellisense. How can I represent a " so it is
converted
when displayed? Something like str = ";quot c:\program files ;quot".


You can encode double quotes inside string literals by two consecutive
double quotes, for example:

\\\
MsgBox("He said: ""Hello world!""")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

P: n/a
Chr(34)

Dim strText As String = Chr(34) & "This is a test" & Chr(34)
MessageBox.Show(strText)

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.