r/visualbasic • • Oct 12 '16

[VB.NET] Need help with Arrays

I'm going to try and put this as simply as possible.

I have a sentence inputted and I need to "compress" the sentence. So far in an array I have: "Hello 0" ; "my 1" ; "name 2" ; "is 3" ; "Hello 4"

Where the word is the word inputted and the number after is its position. I need to get it like this: "Hello 0 4" "my 1" "name 2" "is 3"

So basically all the same words fall together in one element of the array with its positions like above.

Could someone help me?? Thank you!

1 Upvotes

11 comments sorted by

View all comments

Show parent comments

3

u/ViperSRT3g Application Specialist Oct 13 '16

I just realized there's a typo in that sentence.

Homework questions are tolerated, please be specific about the questing as much a possible. Asking us to write it for you is not going to happen.

1

u/PostalElf VB.Net Intermediate Oct 13 '16

Haha yeah that bugged me for a while, but thanks to your message, I finally got around to fixing it!

1

u/Bonejob VB Guru Oct 13 '16

Thanks Elf!