What I Used for this tutorial
Because I started this tutorial while Visual Studio.NET was still in testing, I've used Visual Studio 6. I hope that using an environment that wasn't created for C# has helped me keep my promise that the tutorial will be helpful for anyone developing C# applications, regardless of the chosen development environment. As I mentioned before, you can even write the demos in this tutorial by using Notepad and you'll get the expected results.
"Hello, World"
Assuming you've decided on a development environment, let's look at your first C# application, the canonical "Hello, World" application. Write the following code into a file, and save it with a filename of HelloWorld.cs: -
class HelloWorld { public static void Main() { System.Console.WriteLine("Hello, World"); } }
Let's not worry yet about what each line of code does. At this point, we're just concerned with presenting the first application, getting it compiled, and executing it. Once we've done that-which will validate that you have the correct environment for creating and running C# applications-we'll look into the details of what this code does.