469,315 Members | 1,795 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Escape Character

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
6 27258
=?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
in string, how about in VB.NET, any escape character like @?
Thank you


No.
Nov 21 '05 #3
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
* =?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
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
* "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.

Similar topics

3 posts views Thread by newsgroupie | last post: by
7 posts views Thread by Steve | last post: by
3 posts views Thread by Steve | last post: by
15 posts views Thread by pkaeowic | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.