Not all code paths return a value in lambda expression of type 'Func<object>'

I was just trying to assign a simple array but this error keeps popping up, but sometimes it does not and everything works fine, but a lot of time it does and I am not sure why can someone please tell me when I went wrong?


Can you try the following?

new Int32[] {7,5,2,4,3,9}



Thanks Yoichi, i think i know the problem now. It was asking for a C# expression and I provided a VB.NET one instead. Is there a way to switch from C# to VB within the UiPath Studio?

1 Like

You can use Invoke Code activity, but its not a efficient way :slight_smile: @Zk_Tan

Thanks, is there any other way that I could switch from C# to VB? I notice when I start a new Project/process it gives me the option of coding in C# or VB, however when i am in the workflow page and click New, it does not give me the same option

Hi add data row I am getting the same. I have C# as language. How do I write syantax for it

Anybody can help me on this, even I am also facing same when try to add in add data row activity.

use .ToString

I hope this will help :+1: