private void button1_Click(object sender, EventArgs e)
{
var name = new string[] { "田中", "佐藤", "森田" };
var score = new int[] { 30, 40, 50 };
//LINQのZIPでマージする
var results = name.Zip(score, (n, s) => new { Name = n, Score = s });
foreach (var X in results)
{
MessageBox.Show("Name:" + X.Name + "| 点数:" + X.Score);
}
}
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim name = New String() {"田中", "佐藤", "森田"}
Dim score = New Integer() {30, 40, 50}
'LINQのZIPでマージする
Dim results = name.Zip(score, Function(n, s) New With {.Name = n, .Score = s})
For Each X In results
MsgBox("Name:" & X.Name & "| 点数:" & X.Score)
Next
End Sub