Is the Invoke Code Activity a dotNET Lambda Expression?

Hello UiPath Team,
at the moment I try to use the Invoke Code activity and with one command I get an interesting error.

Tiny questions: Is the Invoke Code activity a lambda expression?
If yes, is it equal like the following code example?

'-Begin-----------------------------------------------------------------

Imports System.Console

Module Module1

  Sub Main()

    Dim UiPath_InvokeCode As Action = Sub()
      '-Invoke Code starts here-----------------------------------------

      Console.WriteLine("This is a test")
    
      '-Invoke Code ends here-------------------------------------------
    End Sub

    UiPath_InvokeCode.Invoke()

  End Sub
 
End Module

'-End-------------------------------------------------------------------

UiPath_Lambda002

What are the restrictions of Invoke Code?

Thanks for hints and answers.

Best regards
Stefan