0

Hello everyone, I need small help with arrays, been smashing head whole night getting it work, so if anyone know solution for this please let me know here or post example snippet.
So i have example code:

Dim housing() As String = {"House", "Flat"}
Dim people() As String = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"}

Now i need help how to make third array as:
House-01
House-02
House-03
...
House-10
Flat-01
Flat-02
...
Flat-10

Ye it has to have 0 before first 9 numbers :/

2
Contributors
1
Reply
9
Views
2 Years
Discussion Span
Last Post by hericles
1

A double loop should do the trick

For Each house as string in housing
    For Each person as string in people
        Dim s as string = house + "-" + person
    Next
Next

My VB.Net is a little rusty so my syntax maybe off but that should be the general idea.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.