Static Array:
Dynamic Array (Value changes at the runtime)
In the below code the array will be vary depending on the roles exist for the user. This is dynamic array
Code:
Dim No_Passengers(3)
The No_Passengers can store 4 values.
Assigning values to the array
No_Passengers(0) = 1
No_Passengers(1) = 2
No_Passengers(2) = 3
No_Passengers(3) = 4
Dynamic Array (Value changes at the runtime)
In the below code the array will be vary depending on the roles exist for the user. This is dynamic array
Code:
Dim arrUserRoles()
If objChildWebTable.Count <> 0 Then
ReDim arrUserRoles(objChildWebTable.Count - 1)
For intCount = 0 To objChildWebTable.Count - 1
arrUserRoles(intCount) = objChildWebTable(intCount).GEtROProperty("outertext")
Next
Else
Reporter.ReportEvent micFail,"User Roles","Logged in User have no roles in the drop down list"
End IF