473,666 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DotNet equivlant of vb 6 instr

what is the equivlant of the vb 6 instr

I have a string there has "*D*N"
I want to find the position that the D is in with a dotnet (VB) function
Mar 30 '08 #1
6 2562
Hi Brian,

You might not believe it, but you can use InStr ;-)

Strings.InStr

If you want to go the .NET way, then you might want to use Strings.IndexOf .

Please note that like in VB6, InStr is 1-based while IndexOf is 0-based.

Best regards,

Martin

Am 30.03.2008 11:22, Brian schrieb:
what is the equivlant of the vb 6 instr

I have a string there has "*D*N"
I want to find the position that the D is in with a dotnet (VB) function

Mar 30 '08 #2
Brian wrote:
I once heard that those VB methods would be removed in future
versions of vb.net. I am using VB.2005 and have not seen vb2008. Do
you know if what I heard is true, or just a rumour?
Brian
That's FUD.

As Michel said, the msvb namespace is part of the framework. That means it is
there forever in 2.0, 3.0, and 3.5. If some future version of the framework
drops them, just stick to the versions that already have it. ;-)
Mar 30 '08 #3
On Mar 30, 7:42*am, "Brian" <bsgalla...@com munity.nospamwr ote:
I once heard that those VB methods would be removed in future versions of
vb.net. *I am using VB.2005 and have not seen vb2008. *Do you know if what I
heard is true, or just a rumour?
* * Brian
It's confusion. Microsoft.Visua lBasic will always be there. It's
what makes VB.NET, well, VB.NET. What is likely to be removed at some
point (and probably not in the immediate future) is
Microsoft.Visua lBasic.Compatab ility - which is the library used to
contains some of the deprecated VB methods to VB.NET

--
Tom Shelton
Mar 30 '08 #4
"Brian" <bs********@com munity.nospamsc hrieb:
>I once heard that those VB methods would be removed in future versions of
vb.net. I am using VB.2005 and have not seen vb2008. Do you know if what
I heard is true, or just a rumour?
Nonsense. They are part of Visual Basic and they have even survived the
transition from VB6 to VB.NET, so there is no reason for removing them. In
addition, they are well-tested code.

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

Mar 30 '08 #5
Perhaps a misunderstandin g. I never seen that so this is what I would called
a rumour... It's true though that some of the VB specific helpers are not
included in the compact framework...

So if plan to target the compact framework, it could make sense to avoid
using some of those VB specifics features....

--
Patrice

"Brian" <bs********@com munity.nospama écrit dans le message de news:
OS************* *@TK2MSFTNGP06. phx.gbl...
>I once heard that those VB methods would be removed in future versions of
vb.net. I am using VB.2005 and have not seen vb2008. Do you know if what
I heard is true, or just a rumour?
Brian

Mar 31 '08 #6
"Patrice" <http://www.chez.com/scribe/wrote in message
news:ur******** *****@TK2MSFTNG P04.phx.gbl...
Perhaps a misunderstandin g. I never seen that so this is what I would
called a rumour... It's true though that some of the VB specific helpers
are not included in the compact framework...

So if plan to target the compact framework, it could make sense to avoid
using some of those VB specifics features....

--
Patrice

"Brian" <bs********@com munity.nospama écrit dans le message de news:
OS************* *@TK2MSFTNGP06. phx.gbl...
>>I once heard that those VB methods would be removed in future versions of
vb.net. I am using VB.2005 and have not seen vb2008. Do you know if what
I heard is true, or just a rumour?
Brian
Take a look in the help files. They tell you which parts of the language
are included in the compact framework.

Mike.
Mar 31 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
309881
by: DTB | last post by:
I am trying to convert a complex function from Oracle to SQL Server and have come across Oracle's Instr() function. I see SQL Server has CHARINDEX() which is similar, however it does not provide some key functionality I need. Here is an example of the Oracle code: if Instr( sTg , cDelim, 1, 3 ) > 0 then sd := SubStr( sTg, Instr( sTg , cDelim, 1, 1 ) + 1, Instr( sTg, cDelim, 1, 2 ) - Instr( sTg , cDelim, 1, 1 ) - 1)
6
4000
by: Chris Calzaretta | last post by:
Hello Everybody, Question instr function will give you the first instance of the finding so EX: so your string looks like string1 = "testing>This is > just a test > testtesttest" instr(string1,">")
4
1983
by: Gordon | last post by:
Hi; I am trying to extract a substring using a combination of the mid() and Instr() i.e. aString = "Jones, Thomas R, Dr." hold = InStr(1, aString, " ," , 1) newString = Mid(aString, 1, hold) + Mid(aString, hold + 2, InStr(hold + 1,
3
2590
by: Mary | last post by:
MemberID VID 1002 1001 1003 1002 1004 1003 1005 1003 1007 1001 1012 1002 <% MemberList = "1001, 1003, 1002"
4
3914
by: fischerspooner | last post by:
Hi, I'm banging my head against the desk because I can't find a solution for the following simple problem. Case: There is a column in a table that has FamilyName and FirstName(s) in one field. ie "McCarthy,John Doe Willy". I have to split up Familyname and the 1st FirstName. The FamilyName works perfect, just looking up the comma with InStr and use Left(). Now can someone throw me a bone to help me get the 1st Firstname. "John" according...
12
2969
by: rodchar | last post by:
hey all, i'm getting a result that i don't understand i have a string "test1, test2" If InStr("test1") and InStr("test2") Then 'Inside EndIf The inside is not running for some reason. Any ideas?
2
2188
by: Puneet Bhatnagar | last post by:
A textual comparison starting at position 4. Returns 6. MyPos = Instr(4, SearchString, SearchChar, 1) ' A binary comparison starting at position 1. Returns 9. MyPos = Instr(1, SearchString, SearchChar, 0) ' Comparison is binary by default (last argument is omitted). MyPos = Instr(SearchString, SearchChar) ' Returns 9. MyPos = Instr(1, SearchString, "W") ' Returns 0.
3
2624
by: lstrudeman | last post by:
Hello; A friend gave me this syntax and they are unavailable at the moment and I need this asap. I am trying to figure out how SQL figures this out. Below the syntax takes a field in a file and breaks apart the pieces of the key for other uses. The field looks like this 1234567*AWD*07FA (or 1234567*FPER*07FA). I just need to understand how the numbers behind the TA_2007_ID field work to break apart they key?? The first one is easy.. it just...
3
2238
by: Alex Pavluck | last post by:
I have a date stored like this '2004 - 2006' and I use this code to get startyear and stopyear StartYear: Trim(Left(,InStr(,"-")-1)) StopYear: Trim(Right(,InStr(,"-")-1)) Is there a way to get this to only run on NON MISSING Project Dates? Thanks! Alex
0
8438
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.