Public Delegate Function ProcessFunction(ByVal StringIn As String) As String

Public Class Form1
    Private CustomerNames() As String = {"Bob Evans", "Chan Park", "Jill Svetlova"}


    Private Sub cmdCapitalize_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCapitalize.Click
        ProcessArray(CustomerNames, AddressOf CapitalizeName)
    End Sub

    Private Sub cmdLowercase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLowercase.Click
        ProcessArray(CustomerNames, AddressOf DeCapitalizeName)
    End Sub

    Public Sub ProcessArray(ByVal MyArray As String(), _
    ByVal FunctionToUse As ProcessFunction)

        Dim i As Integer
        For i = 0 To MyArray.GetUpperBound(0)
            MyArray(i) = FunctionToUse(MyArray(i))
            MessageBox.Show(MyArray(i))
        Next i

    End Sub

    Public Function CapitalizeName(ByVal Name As String) As String
        Return Name.ToUpper()
    End Function

    Public Function DeCapitalizeName(ByVal Name As String) As String
        Return Name.ToLower()
    End Function

End Class
