How to display Hello World with C#

 

Well, this is where it begins, C#, a HelloWorld console and Windows form application.

Microsoft has made it super easy for anybody to start programming, but this is really just the beginning. You'll find tons of sweet additions in C#, my favorite is Intellisense, which accurately predicts what I'm going to be typing simply based on a few letters and history of what I've typed. Intellisense was present in Microsoft Visual C++ but really not to this extent, it was pretty much only useful when you had a class with functions or members.

Here's a video that should guide you through how to get started in C#. It gets more interesting later on
but let's start by getting our feet wet.


I like to have a recipe for everything, that way its easier to tell where it went downhill. Watch the video to guide you through.


1- Start Microsoft Visual Studio (whichever version, it'll be the same for now). I'm using the Ultimate edition.

2- Click on New Project

3- Select Windows Console Application

4- Type in a name in the application name: I will type HelloWorldConsole

5- Type Console.WriteLine("Hello World!!!") in the main function

6- Press F5 to start debugging or Ctrl-F5 for start without debugging which will keep the screen on after the application exits.



And there you have it. Your own first program. Play around with what you can type in there as well as format just to confirm to yourself that you are in control of C#... for now.





Console applications are fun for beginners but if you want to do something commercial, it's just not awesome enough. I'd go to at least Windows form for something acceptable and make money or make someone happy. Here's a tutorial on how to do Hello World using Windows Form with C#. As you can see, its very simple and that's thanks to Microsoft (i'm a big fan).




And what's hot now are phone apps. Windows also has its own phone and the beauty of it is that the language used to program it is C#!!! Which means that all the stuff you learn from Windows Forms is reusable here, plus more. I've programmed iPhone-iPad apps before and I'll tell you, the submission procedure is so much simpler with Windows phone that I was considering switching over to Windows phone only.


Here's a hello world video on windows phone, hope you enjoy how simple it is and go from there!
















Comments

Post a Comment

Popular Posts