Most of the examples you’ll find online will show you something like this:

That’s all fine and good, except that won’t work for our Windows Forms application without changing the type of the project to console, etc.

Thankfully, this is completely unnecessary, because you can simply do this:

And you can use this anywhere in your application, you aren’t just restricted to using it in the main() method like in a console application.