From the course: Source Code Control in .NET with Git Using SourceTree

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Diving into the details

Diving into the details

From the course: Source Code Control in .NET with Git Using SourceTree

Start my 1-month free trial

Diving into the details

- [Instructor] Let's dive into the details about the basic flow. The first thing I want to do is make some more changes to my program, and in fact, I don't very much like working in Main, it's a static method. So let's create a new class. We'll go over to HelloWorld, we'll say Add, New File. We're going to make that a standard Empty Class, and we'll call it Runner. Once Runner comes up, notice it's not static. We're going to give that class a Run method. We'll make that public, void, and we'll call it Run. And we're going to take all of what we did in our Main method and move that into Run. So take it out of here, and we're going to move it over to the Run method. Now, back in our static Main, all we have to do is make an instance, which we'll call Runner, new Runner, and once we have that instance, we can tell Runner to run. That is going to cause the Run method to run from the Runner class, and it will have the effect of writing out those same three lines. But now we're not working…

Contents