# Is the Invoke Code Activity a dotNET Lambda Expression?

**URL:** <https://forum.uipath.com/t/is-the-invoke-code-activity-a-dotnet-lambda-expression/84951>\
**Category:** Help\
**Tags:** system, activities\
**Created:** [December 29, 2018, 5:30pm UTC](https://forum.uipath.com/t/is-the-invoke-code-activity-a-dotnet-lambda-expression/84951 "2018-12-29T17:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanSchnell](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/stefanschnell/32/173622_2.png) [@StefanSchnell](https://forum.uipath.com/u/StefanSchnell)\
**Post date:** [December 29, 2018, 5:30pm UTC](https://forum.uipath.com/t/is-the-invoke-code-activity-a-dotnet-lambda-expression/84951/1 "2018-12-29T17:30:16Z")

</div>

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

 ![UiPath_Lambda001](https://global.discourse-cdn.com/uipath/original/3X/c/c/ccca347ac4a19c3b7b9bbd3e31977b751f3113b6.jpeg)

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](https://global.discourse-cdn.com/uipath/original/3X/d/5/d58ba3938adbae6f1c661da9b1e6a01f320677cf.jpeg)

What are the restrictions of Invoke Code?

Thanks for hints and answers.

Best regards  
Stefan
