"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,
I am trying to create a simple code but I am having problems:
1. Create an array of integers: myArray = (1,0,1,0)
2. Detect the size of this array.
3. Create a string like this:
"item" & myArray(0) & "item" & myArray(1) ...
In this case I would get the string:
"item1item0item1item0"
Can someone help me out?
Thanks,
Miguel
You could look into the split function, getupperbound(0) and the
stringbuilder function as follows
dim strArray() as string = split("0,2,4,5,6,1",",")
dim intCount as int32 = strArray.getUpperbound(0)
strArray will yield and array of the 0, 2 etc starting at the index of
strArray(0) and intCount will equal 6. So you last value will be strArray(5)
..
Using stringbuilder.append method you can build your string
Hope this helps.
Mike