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

Escape Character

P: n/a
In C#, it has a escape chatacter @ then can ingnore all the escape charactrer
in string, how about in VB.NET, any escape character like @?
Thank you
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
=?Utf-8?B?SEsgZ3V5?= <HK***@discussions.microsoft.com> wrote in
news:8B**********************************@microsof t.com:
In C#, it has a escape chatacter @ then can ingnore all the escape
charactrer in string, how about in VB.NET, any escape character like


I don't believe so.

Just double all quotes.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 21 '05 #2

P: n/a
in string, how about in VB.NET, any escape character like @?
Thank you


No.
Nov 21 '05 #3

P: n/a
C

"HK guy" <HK***@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
In C#, it has a escape chatacter @ then can ingnore all the escape charactrer in string, how about in VB.NET, any escape character like @?
Thank you


No, In VB.NET, you can find the special character in module
Microsoft.VisualBasic.ControlChars. These constants are equivalent to escape
characters of C#.
Nov 21 '05 #4

P: n/a
* =?Utf-8?B?SEsgZ3V5?= <HK***@discussions.microsoft.com> scripsit:
In C#, it has a escape chatacter @ then can ingnore all the escape charactrer
in string, how about in VB.NET, any escape character like @?


There are no escape characters. Notice that a single quote must be
"encoded" as two single quotes inside a string literal. For special
characters, take a look at 'ControlChars':

\\\
Dim s As String = "Hello" & ControlChars.NewLine & "World"
///

There is no runtime performance loss because the compiler will determine
that this is a single constant and store it as a single constant in the
executable file.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5

P: n/a
Herfried,
\\\
Dim s As String = "Hello" & ControlChars.NewLine & "World"
///

There is no runtime performance loss because the compiler will determine
that this is a single constant and store it as a single constant in the
executable file.


It can be true however what the hell of a loss of performance this could
be, even when it is in a loop which goes a billion times it would be less
than a millisecond probably.

:-)

Cor
Nov 21 '05 #6

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
There is no runtime performance loss because the compiler will determine
that this is a single constant and store it as a single constant in the
executable file.


It can be true however what the hell of a loss of performance this could
be, even when it is in a loop which goes a billion times it would be less
than a millisecond probably.


Full ACK. I only wanted to make sure that the OP doesn't think VB.NET
isn't as clever as C# ;-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.