Writing VB.net code vs using activities, best practices?

Hi All, I’m wondering how other devs decide when to use InvokeCode versus using an activity.

An example would be renaming and moving all files meeting certain criteria from one folder to another. If you could accomplish this with 15 lines of code, versus a 15 activity sequence, which would you choose?

Hi @steve3886,

Instead of doing it with VB.Net code we can do it using UiPath Activities. I will always try to use UiPath activites with maximum code in it. As you mentioned if we need to get the latest files, I will use VB.Net linq query to filter files with certain criteria and using since assingn activity we will get the output. Invoke code with multiple lines of code is a complex solution for long term maintenance of the projects.

1 Like