NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page "Hello World" Program example with explanation for beginners

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-22-2008, 06:25 AM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Aug 2008
Posts: 1
platter007 is an unknown quantity at this point
 



"Hello World" Program example with explanation for beginners


"Hello World" Program example with explanation for beginners

Here is your steps to start programming in C#. Let first we create a simple program that will show the basics structure of C# programming.If you find C# syntax more interesting the use it for long term.

"Hello World" Application with C#

Step 1 Start Visual Studio.net. By clicking Start > Programs > Visual Studio.

Step2 Create a new project. By clicking File > New > Project and Select "Visual C# Project" and choose the Console application.A project is created for you with the following coding.

=====Coding Starts ==============
using System;

public class Hello
{
public static void Main (string[] args)
{
Console.WriteLine("Hello World");
}
}
=======Coding End =================================

Step3 Compile the application by pressing Ctrl +F5 on the keyboard. Result Will open a new window with text "Hello World"(without quotes).

Step4 Let me explain the different lines of the codes so you can understand the basic structure of the application

using System;
---->Here "System" is a namespace and if we want to use any classes of the .Net Framework then first of all we have to write the name of the namespace by using the keyword 'using' that means we are using that namespace classes in our application.Example:"Console.WriteLine" is a part of system Namespace.

public class Hello
----> This is the name of our class.(as I assume you have some knowledge of OOPS concept.)
????: NamePros.com http://www.namepros.com/code/506437-hello-world-program-example-explanation-beginners.html

public static void Main (string[] args)
----> This is the entry point of our program.Here "strin[] args" is the command line parameters.

Console.WriteLine("Hello World");
---> This function will write the "Hello World" on the console.

so above is a small program which will make you familiar with C# syntax and know the basics like how to start a new project, compiling program etc.
platter007 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:25 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger