Coding in C# instead of VB.Net

Didnt know that existed, I love you!

3 Likes

C# expressions still don’t seem to be allowed in studio. Is there a setting to enable them? Or am I just not doing them correctly?

1 Like

I get Document is invalid doing that.

Hello,

Me too getting the Document error,
If you have converted working files can you share?

Thanks,
Meg

2 Likes

Hi, please let me know if you guys were able to find a solution to using C# code directly by modifying the xaml file as stated above.

UiPath scores a perfect 10

Productivity

(UiPath 2019.6 Beta is now available!)
Support for C# is now available for processes in Studio. This means that you can choose between C# and Visual Basic when creating a process, and use C# expressions in activities to build your project. (Currently experimental status)

9 Likes

It is experimental, so please provide feedback and report all the bugs :slight_smile:

5 Likes

we used to get into vb.net :slight_smile: even started loving it :smiley:

3 Likes

How to use C# in Invoke Code activity?
I’ve checked C# working in assign activity it’s working

But in invoke code I received error message.

19.6.0-beta.92+Branch.release/v2019.6.0.Sha.23f7b903e75b338d151bed7a46b44547b99226f5

The workflow has validation errors. Review and resolve them first.

No compiled code to run
error BC30081: ‘If’ must end with a matching ‘End If’. At line 1
error BC30205: End of statement expected. At line 1
error BC30037: Character is not valid. At line 2
error BC30035: Syntax error. At line 3

It’s actually only two places in project I want to use c#.

  1. Invoke code activity, and
  2. assign activity.
    Mostly for simplifying complex LINQ-query.
2 Likes

Hi @Uemoe

Welcome back! :slight_smile:

Could you show a screenshot with the snippet of code that you are trying to use in the Invoke Code activity?

3 Likes

It was something very simple like
if (true) {
Console.WriteLine(“Hello, World!”);
}

Indeed, seems like some simple syntax isn’t recognized. For a comparison, this worked when I ‘simplified’ the code :sweat_smile: :

3 Likes

Hi @Uemoe
The support for C# in Invoke code will be coming in 19.7. Right now, Invoke Code supports still only VB.

2 Likes

In terms of functionality, do you think being able to Invoke C# in VB projects and vice versa, would be useful?

2 Likes

People usually use c# but there is not much difference than the syntax. It’s been a very long while since I’ve used VB in any application other than UiPath. So as I write previously, I used to get on it :slight_smile: and also I think working solution is the best soluiton so there is no reason for me to switch on c# at the moment.

4 Likes

Yes. Have I said it’s only place were it make sense. And it would be very useful to have opportunity in legacy projects invoke c# code

Great News! Do you happen to know if there are plans to offer a C# version of REFramework in the future? I use the REFramework in all of my projects, but when I do, it automatically sets the project to VB.

Thanks,
Jason

4 Likes

Can somebody please tell us how much C# is supported in Studio? What version of C# is being used? Are there any caveats? The studio warns that C# is an experimental mode.

Don’t expect too much, it is mainly related with windows workflow foundation rehosting approach rather than UiStudio enhancement :slight_smile:

Can you explain more?