Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
.NET Framework GroupsView
.NET Distributed_Apps
.NET
.NET ADO.NET
.NET ASP.NET
.NET ASP.NET Security
.NET ASP.NET Webcontrols
.NET ASP.NET Web Services
.NET Clr
.NET Compact Framework
.NET Drawing
.NET Interop
.NET Performance
.NET Web Services
.NET Windows Forms
.NET Windows Forms Controls
.NET General
.NET Csharp
.NET Visual Basic
.NET Vc
.NET Security
.NET Xml
Vsnet Debugging
Xml
Xsl
Scripting Jscript
Scripting Visual Basicscript
Scripting Wsh
Smartphone Developer
Visual Basic Com
Visual Basic Controls
Visual Basic Crystal
Visual Basic Database Ado
Visual Basic Syntax
Visual Basic Winapi
Vc Atl
Vc Debugger
Vc Language
Vc Mfc
Vc Stl
Visio Developer Visual Basica
Windowsce Embedded Vc
Windows Powershell
Visual Basic Vista Compatibility
Deployment Server
.NET Micro Porting

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Apps
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft NET Visual Basic Posts  Ask A New Question 

DotNet equivlant of vb 6 instr

Brian posted on Saturday, March 29, 2008 11:22 PM

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
reply

 

Hi Brian,You might not believe it, but you can use InStr ;-)Strings.

Martin H. posted on Saturday, March 29, 2008 11:29 PM

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:
reply

DotNet equivlant of vb 6 instr

Michel Posseth [MCP] posted on Sunday, March 30, 2008 4:53 AM

http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.strings.instr.aspx

As you see this method is part of the VB.Net syntax , so i guess you would
bether refrace that comment as
if you want to abandon the VB namespace   .

if you want to do this
http://www.codeproject.com/KB/vb/novbruntimeref.aspx    ( see my comments on
Rafael for further detail )

Then it might be bether to use only the comonly shared framework classes
although , there is nothing that keeps a C# , J# , etc etc etc ( other
framework languages ) from setting a reference to the microsoft visual basic
dll and use the handy VB methods ,   note that this dll is NOT for backwords
compatibility !! but contains specific VB methods ( shortcuts , behaviors ,
Contstants  )  that are part of the VB namespace and in it`s turn is  part
of the  Framework


Michel
reply

I once heard that those VB methods would be removed in future versions of vb.

Brian posted on Sunday, March 30, 2008 9:42 AM

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
reply

Well in VB.

Michel Posseth [MCP] posted on Sunday, March 30, 2008 10:14 AM

Well in VB.Net 2008  they are still there  , and i  personally can`t
inmagine that they would be removed unless MS would fase out VB wich is not
likely to happen


HTH

Michel
reply

DotNet equivlant of vb 6 instr

Steve Gerrard posted on Sunday, March 30, 2008 12:38 PM

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. ;-)
reply

DotNet equivlant of vb 6 instr

Herfried K. Wagner [MVP] posted on Sunday, March 30, 2008 3:03 PM

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/>
reply

DotNet equivlant of vb 6 instr

Tom Shelton posted on Sunday, March 30, 2008 5:04 PM

what I

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
reply

Perhaps a misunderstanding.

Patrice posted on Monday, March 31, 2008 6:51 AM

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
reply

DotNet equivlant of vb 6 instr

Michael D. Ober posted on Monday, March 31, 2008 8:00 AM

Take a look in the help files.  They tell you which parts of the language
are included in the compact framework.

Mike.
reply


Previous Microsoft NET Visual Basic conversation.