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

Microsoft.VisualBasic.Chr(0)

P: n/a
Hello you,

How does one replace the following function from 'Microsoft.VisualBasic'
namespace:

REM Return the character associated with the specified character code.
Microsoft.VisualBasic.Chr(0)

with a function from 'System' namespace?

Thanks,

me.
i.e.
Microsoft.VisualBasic.InStr(strMyString, "e")

would become

strMyString.IndexOf("e") Rem System.String.IndexOf().
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"Qwert" <no**@nosp.com> schrieb:
How does one replace the following function from 'Microsoft.VisualBasic'
namespace:

REM Return the character associated with the specified character code.
Microsoft.VisualBasic.Chr(0)

with a function from 'System' namespace?
There is no replacement. I prefer VB.NET's 'ControlChars.NullChar', others
'vbNullChar', but that's up to personal preference.
i.e.
Microsoft.VisualBasic.InStr(strMyString, "e")

would become

strMyString.IndexOf("e") Rem System.String.IndexOf().


I am just curious why someone would want to do that. If you are using
VB.NET, /use/ it.

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

Nov 21 '05 #2

P: n/a
Qwert,
How does one replace the following function from 'Microsoft.VisualBasic'
namespace:

REM Return the character associated with the specified character code.
Microsoft.VisualBasic.Chr(0)

with a function from 'System' namespace?

i.e.
Microsoft.VisualBasic.InStr(strMyString, "e")

would become

strMyString.IndexOf("e") Rem System.String.IndexOf().

In what program language do you need this?

Cor
Nov 21 '05 #3

P: n/a
> I am just curious why someone would want to do that. If you are using
VB.NET, /use/ it.


As a result of some articles I read on the internet, I was under the
impresion that the namespace Microsoft.VisualBasic was not part of the core
..NET framework, allthough it is distributed with every .NET framework.
And it will probably remain so, however I try to find similar functionality
in other namespaces. Not important, but tricky for me sometimes since there
are so many namespaces.

Nov 21 '05 #4

P: n/a
"Qwert" <no**@nosp.com> schrieb:
I am just curious why someone would want to do that. If you are using
VB.NET, /use/ it.


As a result of some articles I read on the internet, I was under the
impresion that the namespace Microsoft.VisualBasic was not part of the
core .NET framework, allthough it is distributed with every .NET
framework.
And it will probably remain so, however I try to find similar
functionality in other namespaces. Not important, but tricky for me
sometimes since there are so many namespaces.


It's always good to know about the different ways to archieve a certain
thing. However, I suggest to make use of VB.NET's features when possible.
'Microsoft.VisualBasic' can be seen as part of VB.NET and thus it's obvious
that this namespace should be used.

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

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.