VBLINQで直積


''' <summary>
''' http://qiita.com/shinaisan/items/d57bc231ac0a9a340184
''' </summary>
''' <remarks></remarks>
Module Module1

    Sub Main()

        Dim grades As String() = {"1年", "2年", "3年"}
        Dim classes As String() = {"A組", "B組", "C組"}

        Dim GradeClass = From g In grades
                         From c In classes
                         Select New With {.grade1 = g, .class1 = c, .text = (g & c)}

        For Each n In GradeClass
            Console.WriteLine(n.text)
        Next
        Console.ReadLine()
    End Sub

End Module