From the course: Robotic Process Automation: Tech Primer

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Functions demo: Programming

Functions demo: Programming

- [Instructor] Okay, let's have a quick demo, and see what it looks like to use functions and subroutines within Microsoft Visual Studio. I've got Visual Studio open, I'm going to create a new project using New, Project. We'll create a console application like we did before, so I'm in Visual Basic, Windows Desktop, and I'll select Console App. I'll name it functions-demo, and I'll save it in C:\development\vs, you can put yours wherever you want. I'll leave everything else pretty much default here, and click OK. So now, like usual, we've got our main module, which is a vb file. We could rename that if we want to. And we've got our main routine here, which represents the program. If I run it right now, it will open and close, so let's go and add our Console, tab, .read, and double-click on ReadLine. That'll keep the application open when we run it. And, to give you a basic idea of how subroutines and functions work, I'll just use my Console, tab, .WriteLine again, and inside those…

Contents