VB NOTES PART 18 - List (2) = 12 List.RemoveAt (1)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
4/12 -----Collections Basically, a dynamically-sited array grows as needed Dim list As List (of Integer) = New List (of Integer) Dim x As Integer = 5 List.Add(x) ‘adds element to next position 5 5 5 5 List.Add(x+3) 8 7 7 12 List.Insrt (1, 7) 8 12 ‘insert element at index (7—element, 1—index)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: List (2) = 12 List.RemoveAt (1) ‘removes element at position, move others up Dim answer As Integer = list.Count For each Z As Integer in list ‘do sth Answer += Z--------19 Next...
View Full Document

This note was uploaded on 12/01/2011 for the course 6K 226 taught by Professor Staff during the Fall '10 term at University of Iowa.

Ask a homework question - tutors are online