Re: reinitialize an array



Dim myArray as String() = New String() {"1", "2", "3"}

myArray = New String() {"4", "5", "6"}


Note that the only difference, apart form the value, is that the first time,
the Dim ... is used and subsequently it is not required.


"Seigfried" <Seigfried@xxxxxxx> wrote in message
news:1169160409.318899.46560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
An array can be initialized with code like this:

Dim myArray() as String = {"1", "2", "3"}

What I'd like to do is reinitialize the same array. Something like the
statement:

myArrray = {"4", "5", "6"}

(which doesn't work, of course)

Any suggestions?



.



Relevant Pages

  • Re: Keeping score
    ... Sorry for misunderstanding the first time. ... you are adding one to numCorrect or numIncorrect no matter ... I have tried using the qAnswered array found on the site, ... Dim visitedAs Boolean ...
    (microsoft.public.powerpoint)
  • Re: Detecting a running process.
    ... Private Declare Function EnumProcessModules Lib "psapi.dll" _ ... (ByVal dwProcessID As Long, _ ... Dim nProcesses As Long ... 'fill an array of longs with the ...
    (microsoft.public.vb.winapi)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)