Would anyone be able to tell me what is the difference between a Func and a Function in VB.

For instance see the following:

Dim F As Func(Of String) = Function() As String
                             Return "B"
                           End Function
Dim F2 = Function() As String
           Return "B"
         End Function
  • F appears as a Func(Of String)
  • F2 as a Function() As String.

It looks like they do the same thing but given that the compiler sees them as having different types surely there must be a subtlity.

Best regards

Charles

Edit
Report