Please help me the invoke code meaning


I am using invoke code activity and use below code to delete the files in a folder. please tell me the coding meaning

why we using sub(x) Directory.Delete(x,true))

what is the x value.

array.ForEach(Directory.GetDirectories(“YourFolderName”),sub(x) Directory.Delete(x,true))


It’s lambda expression. In this case,iterate each item of Directory.GetDirectories(“YourFolderName”) as x. As a result, this will delete all directories which are returned by Directory.GetDirectories(“YourFolderName”).