Sorry za prvi deo, array fiksirane duzine ne moze da se inicijalizuje iz cuga, ali moze sledeca fora:
Code:
Dim niz() As Byte = {57, 65, 66, 67, 68, 69, 70, 71, 72, 89, 90, 97}
ReDim Preserve niz(12)
Ako dodeljujes niz van deklaracije, onda moras da ga instanciras kao novu referencu
Code:
Dim niz(12) As Byte
niz = New Byte() {57, 65, 66, 67, 68, 69, 70, 71, 72, 89, 90, 97}
i btw, nizovi u VB.NET su zero based po defaultu, kad kazes niz(12) u deklaraciji to je zapravo niz od 13 elemenata (indeksi 0 do 12), mislim da je to ostavljeno zbog komatibilnosti sa vb6 programima/erima.
▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American