Re: Embedding a newline in a vb.net string constant
- From: zacks@xxxxxxxxxxxxxxxxxxxxxxxx
- Date: 6 Dec 2006 13:34:37 -0800
Herfried K. Wagner [MVP] wrote:
<zacks@xxxxxxxxxxxxxxxxxxxxxxxx> schrieb:
Is it possible to embed a newline constant in a string in the same way
as c#? I really don't want to do something like this:
++ String.Format("Line 1 : {0} " & vbcrlf & " Line 2 : {1}", o, t)
when I should be able to do
++ String.Format("Line 1 : {0}\nLine2 : {2}", o, t)
Not the best example, I am sure, but it does get worse in many cases?
So, is there a way to do this in vb, or am I stuck? I have tried
googling but I can't find anything.
The only way I can think of is:
String.Format("Line 1 : {0}{1}Line2 : {2}", o, vbcrlf, t)
This solution is even worse because one additional concatenation needs to be
performed at runtime!
I agree, I was just trying to show the OP the futility in his request.
.
- Follow-Ups:
- Re: Embedding a newline in a vb.net string constant
- From: Andrew Backer
- Re: Embedding a newline in a vb.net string constant
- References:
- Embedding a newline in a vb.net string constant
- From: Andrew Backer
- Re: Embedding a newline in a vb.net string constant
- From: zacks
- Re: Embedding a newline in a vb.net string constant
- From: Herfried K. Wagner [MVP]
- Embedding a newline in a vb.net string constant
- Prev by Date: Re: Embedding a newline in a vb.net string constant
- Next by Date: Excel dll on computer whitout offices
- Previous by thread: Re: Embedding a newline in a vb.net string constant
- Next by thread: Re: Embedding a newline in a vb.net string constant
- Index(es):
Relevant Pages
|