How it works...

Let us take a quick look at what we did in the previous recipe. In steps 1 to 4, we created a C#-based console application. The skeleton for a console application already comes with Visual Studio as a template. Giving a proper name to your project and a location is a good habit. These things will help you to track down your project easily for future use. In step 5, we just make sure the default console application template works fine and that there are no surprises waiting for us before doing any actual coding. 

In step 6, we created a static method that takes a string parameter and returns a message with that parameter; this is called String Interpolation. It's a new feature introduced in C# 6.0 and can be used instead of the traditional string.format() method. Step 7 uses that method inside the main method. As in a normal console application, Console.ReadLine() will wait till any key is pressed before exiting. Finally, in step 9, we debug the code to check that everything works fine and as expected. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.48.181