Home Forum User CP Browse Members Calendar Register Today!  
Get New posts Faq / Help?
   


Not A Member Yet? Register today and become part of the community.

Go Back   Webmaster Forum - 9MB.com > Webmaster Forum > Web Development

Web Development Development concepts, scripts, sponsors, ad placement etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-22-2008, 07:21 AM
platter007
Status: Offline
Junior Member
 
Join Date: Aug 2008
Posts: 1
iTrader: (0)
Rep Power: 0
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.)

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.
IT Consultant | Offshore Software Development | Web Designing Company | IT Staffing Resourcing | Noida Gurgaon Delhi India
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-04-2008, 04:40 PM
hostchecker
Status: Offline
Junior Member
 
Join Date: Sep 2008
Posts: 17
iTrader: (0)
Rep Power: 0
hostchecker is an unknown quantity at this point
Thanks this is cool

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-28-2008, 07:24 AM
jaibin
Status: Offline
Member
 
Join Date: Oct 2008
Posts: 30
iTrader: (0)
Rep Power: 1
jaibin is an unknown quantity at this point
This is the nice explanation of C program. Thanks for sharing with us.
__________________
Jaibin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old Today, 01:53 AM
Richardo
Status: Offline
Member
 
Join Date: Nov 2008
Posts: 48
iTrader: (0)
Rep Power: 1
Richardo is an unknown quantity at this point
This explanation very help for beginners. Thanks for good sharing.
__________________
I am a satisfied customer of
Cheap Java Tomcat Reseller
Webhosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -4. The time now is 07:49 PM.

Skin Design By vBSkinworks



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
Copyright (c) 2007-2008 - All Rights Reserved - 9MB.com