• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

vb.net left$, Mid$ now what

I am use to using left$, mid$ in vb6. I now notice that in vb.net it doesn't work

I know that if I use
Imports VB = Microsoft.VisualBasic

and then vb.left$

it works, but what is the equilvent in vb.net. I mean they have to still have something that does the left$, mid$ - right????


0
bear23
Asked:
bear23
1 Solution
 
coopzzCommented:
Public Function Substring(ByVal startIndex As Integer) As String
Public Function Substring(ByVal startIndex As Integer, ByVal length As Integer) As String

ie: equ to left(s, 5)

dim s as string = "the beast"
msgbox s.substring( 4 )

will alert with "Beast".

this page will give you some comparisons with these things
http://www.ondotnet.com/pub/a/dotnet/2001/07/30/vb7.html?page=2

cheers
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now