473,397 Members | 1,985 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,397 software developers and data experts.

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 2549
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...@community.nospamwrote:
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.VisualBasic 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.VisualBasic.Compatability - which is the library used to
contains some of the deprecated VB methods to VB.NET

--
Tom Shelton
Mar 30 '08 #4
"Brian" <bs********@community.nospamschrieb:
>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 misunderstanding. 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********@community.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*************@TK2MSFTNGP04.phx.gbl...
Perhaps a misunderstanding. 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********@community.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
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...
6
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"...
4
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,...
3
by: Mary | last post by:
MemberID VID 1002 1001 1003 1002 1004 1003 1005 1003 1007 1001...
4
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....
12
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...
2
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,...
3
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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,...
0
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...

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.