473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Microsoft.VisualBasic.Chr(0)

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
4 6219
"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
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
> 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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: darrel | last post by:
I've built a control. At the top of my control, I have this: Imports Microsoft.VisualBasic Then, later, I call a function like this: DateTime.Now.Year.ToString() This works fine on my...
15
by: Phill. W | last post by:
Is anyone writing VB.Net (2003) code /without/ referencing the Microsoft.VisualBasic namespace(?), regardless of whether its Import'ed or not? The Powers That Be here are trying to introduce a...
14
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the...
2
by: Steve | last post by:
Having only recently migrated across from VB6 to VB.NET I'm still unsure whether or not I should be making (heavy) use of the Microsoft.VisualBasic namespace in new applications. I've read a lot...
9
by: Alexander Baranovsky | last post by:
Hello friends, How I can determine full path of Microsoft.Basic.dll? Thanks, Alexander
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
1
by: Tom Kearney | last post by:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I...
4
by: Rainer Queck | last post by:
Hello NG, are there any limitations to be considered, if I make use of objects in the Microsoft.VisualBasic namespace? Regards Rainer Queck
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have two questions with regards to the LEFT function. I ran into a problem with the LEFT function today. I knew it was a valid Function, but when I tried to use it, it was getting interpreted...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.