parsing as string vb.net

I am trying to get the 6171 part out of this string XEVT0126171925_EMP_PIN
I tried .SubString(7,11)
not geting it any ideas?
LVL 6
r3nderAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guru JiCommented:
What you getting with SubString  then

Make sure your string is declared. Try something below and share the output

Dim strTestString As String = "XEVT0126171925_EMP_PIN"
      Dim substring As String = strTestString .Substring(7, 10)
      Console.WriteLine("Result: {0}", substring)
Éric MoreauSenior .Net ConsultantCommented:
as you can see at https://msdn.microsoft.com/en-us/library/aka44szs(v=vs.100).aspx, the second argument is the length (not the ending position). So try:

.SubString(7,4)

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
r3nderAuthor Commented:
does that mean start at the 7th position and give me the next 4? - curious
Éric MoreauSenior .Net ConsultantCommented:
>>does that mean start at the 7th position and give me the next 4? - curious

Almost. It means start at the 8th position because it is 0-based (the first character is at position 0) and give me 4 characters.
r3nderAuthor Commented:
thanks Eric
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.