dim i as integer = YourString.IndexOf("-")
if i < 0 the pattern does not exist in the string, otherwise, "i" has
the offset of the start of the string.
But surely, then you should check that the string isn't Nothing first or you
could get an ArgumentNullException . Why do you consider the VB.NET method
as not "proper" when programming in VB.NET? Would you exclusively use
"String.Concat" rather than "&" ?.
Andrew
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.