Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth
Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

42,844 questions

55,671 answers

573 users

How to create and use a list of integers in VB.NET

2 Answers

0 votes
Module Module1

    Sub Main()

        Dim list As New List(Of Integer)

        list.Add(4)
        list.Add(5)
        list.Add(9)
        list.Add(16)
        list.Add(99)

        For Each item As Integer In list
            Console.WriteLine(item)
        Next

    End Sub

End Module

' run:
' 
' 4
' 5
' 9
' 16
' 99

 



answered Sep 26, 2018 by avibootz
0 votes
Module Module1

    Sub Main()

        Dim list As New List(Of Integer)

        list.Add(4)
        list.Add(5)
        list.Add(9)
        list.Add(16)
        list.Add(99)

        For i = 0 To list.Count - 1
            Console.WriteLine(list.Item(i))
        Next i

    End Sub

End Module

' run:
' 
' 4
' 5
' 9
' 16
' 99

 



answered Sep 26, 2018 by avibootz

Related questions

2 answers 269 views
2 answers 304 views
1 answer 218 views
1 answer 233 views
2 answers 315 views
...