Iterate through loop of variables

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hello-

I have numerous variables called varNameX (where X is equal to a
number from 0 to a known number "n").

Using VB.NET, I would like to iterate through all of these variables
to run comparisons.

Example:

For x as Integer = 0 to N
If varName(x).Text = "Some Text" Then
boolFlag = True
End If
Next

Is there a way to "dynamically" iterate through a collection of
variables? If so, what is the suggested way to do this? (An example
would be greatly appreciated).

Steve
 
Have you trid to ask that question in the newsgroup :

microsoft.public.dotnet.languages.vb ?

This is an ASP.NET newsgroup, and the questions should be related to ASP.NET.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top