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

ControlChars.Lf, ControlChars.Cr, ControlChars.CrLf

P: n/a
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net
Nov 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Cor
LF 10 CR 13

chr(13)
chr(10)

But you can use the controlchar. also.
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net

I hope this helps?

Cor
Nov 20 '05 #2

P: n/a
"kerberoz" <de****@hotmail.com> schrieb
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net


Equivalent? I don't know what you mean, but there is also
Microsoft.VisualBasic.Constants.vbCrLf
Microsoft.VisualBasic.Constants.vbCr
Microsoft.VisualBasic.Constants.vbLf

not to forget
Microsoft.VisualBasic.ControlChars.NewLine
System.Environment.NewLine
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

P: n/a
* "kerberoz" <de****@hotmail.com> scripsit:
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net


The constants you mentioned!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

P: n/a
kerberoz,
As the others have mentioned the equivalents of:
ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf
are ControlChars.Lf, ControlChars.Cr,ControlChars.CrLf

Can you give a little more detail on what you are asking?

Hope this helps
Jay

"kerberoz" <de****@hotmail.com> wrote in message
news:uF**************@tk2msftngp13.phx.gbl... whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net

Nov 20 '05 #5

P: n/a
ok here is what i mean..... ControlChars needs an imports to the
Microsoft.VisualBasic namespace... what i need to know is what the
equivalent of this in pure .NET symantics?

TIA guys :)
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
kerberoz,
As the others have mentioned the equivalents of:
ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf


are ControlChars.Lf, ControlChars.Cr,ControlChars.CrLf

Can you give a little more detail on what you are asking?

Hope this helps
Jay

"kerberoz" <de****@hotmail.com> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net


Nov 20 '05 #6

P: n/a
Kerberoz,
What exactly do you mean by "pure .NET semantics"???

VB.NET is a .NET language, Microsoft.VisualBasic is VB.NET's helper
functions, ergo Microsoft.VisualBasic is .NET.

Yes there are things in Microsoft.VisualBasic that I try to avoid in favor
of the Framework itself, however there are things in Microsoft.VisualBasic
that significantly simplify your code. Making blanket statements to avoid
Microsoft.VisualBasic doesn't particularly make sense to me.

Of course I will strongly recommend you avoid
Microsoft.VisualBasic.Compatibility, as it is there for upgraded VB6
projects. Over the course of time, I slowly Refactor
(http://www.refactoring.com) Microsoft.VisualBasic.Compatibility out of the
picture of my projects I upgraded from VB6.

If you use Object Browser to see the definition of ControlChars.Cr you will
see that it is defined as:

Public Shared Const Cr As Char = ChrW(13)

In the above context ChrW is a constant function, evaluated at compile time.

Hope this helps
Jay

"kerberoz" <de****@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP11.phx.gbl...
ok here is what i mean..... ControlChars needs an imports to the
Microsoft.VisualBasic namespace... what i need to know is what the
equivalent of this in pure .NET symantics?

TIA guys :)
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
kerberoz,
As the others have mentioned the equivalents of:
ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf


are ControlChars.Lf, ControlChars.Cr,ControlChars.CrLf

Can you give a little more detail on what you are asking?

Hope this helps
Jay

"kerberoz" <de****@hotmail.com> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
whats the equivalent following ControlChars.Lf, ControlChars.Cr,
ControlChars.CrLf code in vb.net



Nov 20 '05 #7

P: n/a
Cor
Hi Kerberoz,

Just as a reading comment to the text of Jay B.

What Jay B is writing is all true, but when you read it, you can mix up
Microsoft.VisualBasic with Microsoft.VisualBasic compatibility namespace.

That are 2 different things.

I hope this helps?

Cor

The quoting beneath is very much changed, so if you want to have the real
text look above this.
VB.NET is a .NET language, Microsoft.VisualBasic is VB.NET's helper
functions, ergo Microsoft.VisualBasic is .NET.

. Over the course of time, I slowly Refactor Microsoft.VisualBasic.Compatibility out of the picture of my projects I upgraded from VB6.


Nov 20 '05 #8

P: n/a
* "kerberoz" <de****@hotmail.com> scripsit:
ok here is what i mean..... ControlChars needs an imports to the
Microsoft.VisualBasic namespace... what i need to know is what the
equivalent of this in pure .NET symantics?


There are no direct equivalents. There is 'Environment.NewLine', there
is the 'Convert.ToChar' method. And there is 'Chr' and 'ChrW', but that
are both part of Visual Basic .NET too. I /would/ recommend to use the
constants provided in 'ControlChars'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.