' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Collections

Public Class ThreeInOne
    Private list1 As ArrayList
    Private list2 As ArrayList
    Private list3 As ArrayList

    Public Sub New()
        list1 = New ArrayList
        list2 = New ArrayList
        list3 = New ArrayList
    End Sub

    Public Sub Add(ByVal o1 As Object, ByVal o2 As Object, ByVal o3 As Object)
        list1.Add(o1)
        list2.Add(o2)
        list3.Add(o3)
    End Sub

    Public Function GetFirst(ByVal ix As Integer) As Object
        Return list1(ix)
    End Function

    Public Function GetSecond(ByVal ix As Integer) As Object
        Return list2(ix)
    End Function

    Public Function GetThird(ByVal ix As Integer) As Object
        Return list3(ix)
    End Function

    Public ReadOnly Property Count() As Integer
        Get
            Return list1.Count
        End Get
    End Property
End Class 

Class TestClass
    Public Shared Sub Main(ByVal args As String())
        Dim superlist As ThreeInOne = New ThreeInOne
        superlist.Add("a", 1, 1.2)
        superlist.Add("bb", 12, 12.34)
        Dim i As Integer
        For i = 0 To (superlist.Count - 1)
            Console.WriteLine(superlist.GetFirst(i) & " " & superlist.GetSecond(i) & " " & superlist.GetThird(i))
        Next
    End Sub
End Class
