Am 02.04.2010 23:57, schrieb Saga:
> I am reading 3 strings from a DB table. I need to apply the
> same process to all three strings, so I figured that I would use
> a for loop. To make the loop easier to handle I am going to
> put the three strings into an array so I can loop through each
> one, something like this:
>
> dim sArr() as string
>
> redim sArr(0)
> sArr(0) = string 1
>
> redim preserve sArr(1)
> sArr(1) = string 2
>
> redim preserve sArr(2)
> sArr(2) = string 3
\\\
Dim sArr() As String = {string1, string2, string3}
///
> for each sItem as string in array
Your array variable's name is 'sArr', not 'array'.
> That seems simple enough, except that any one of the
> strings might be empty. I could validate this within the loop:
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
|