Imports System
Public Class SamplesArray
Public Shared Sub Main()
Dim intArray() As Integer = New Integer() {2, 3, 4}
Dim action As New Action(Of Integer)(AddressOf ShowSquares)
Array.ForEach(intArray, action)
End Sub
Private Shared Sub ShowSquares(val As Integer)
Console.WriteLine(val*val)
End Sub
End Class