Solved

vb.net left$, Mid$ now what

Posted on 2004-08-27
1
350 Views
Last Modified: 2010-04-17
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
Comment
Question by:bear23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
coopzz earned 25 total points
ID: 11913119
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Simple Linear Regression
Progress

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question