Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding > Coding Tutorials
You last visited: Today at 06:39

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Lesson1 - How to make your first c# programe

Discussion on Lesson1 - How to make your first c# programe within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 47
Received Thanks: 16
Lesson1 - How to make your first c# programe

hi

today i will be showing you how to make a C# programe veyr very basic
this will give you a genrale idea on some of the stuff on c# this is what you will be needing.

you will need following :-

a computer :P
Windows XP
Visual C # ( i am using 2005 i prefer it but u can choose a updated version
if you choose to)

if you have this YOU ARE READY !

lets begin

Step One

open up you Visual c# programe there should be a start page, click on
File and then New Project.. in Name: type Hello World this is our projects name and click on the Windows Application once you have done this sucesfully please click Ok and it will create your form.

Step Two

You will have a Form1 as you can see and right next to it is a tab called
ToolBox. toolbox has all the neceserry buttons, text boxes ect you will be using this in your application in the future and is a big Help.

but for know we will only useing the AB button click and drag this on to your Form1 anywhere is OK just dont place it outside of you form.

you will see know once you let go that a button has been placed you can change the buttons name buttons name and properties but for now i wont tell that maybe in future totrials.

Step Three

go ahead and double click the Button automatically you will see a code interface pops up this is where you will be spending most your time when u code your own software or programs you can switch between the Disgin view and Form1.cs * view on the tabs above i presume they will not be hard to find :P.

Step Four

know for the fun bit when you click on your button a code interface appears you will se somthing like this :-

namespace HelloWorld
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
THIS IS WHERE YOU WILL RIGHT YOUR CODE
}
}
}


looks complicating? dont worry later on will get much easier we will be righting 1 code line in between the curley braces where i have high lighted
what are the curley braces you might ask? {} <<-- they are just to make life easier in between is where you right ur code this is called a code block i would like you to use that termnolgy atm beocoues it will be used in future purposes i dont want you to get confused if you dont right in between them curley braces your code will be invalid and you program wont work

you might ask

private void button1_Click(object sender, EventArgs e)

why dosnt this code be in between the curley braces this is a event handler when you double clicked the button c# IDE - intractive develpmont enviroment automatically added a event ill explain in later toturials what a IDE is so dont worry about it.

to get back on to the point a event handler never bees in between your code line.

Step Five

right know to right the code, where i stated i want you to write the following i would prefrer you dont copy and past coz wont be practical and this will stik in your memory better

MessageBox.Show("HelloWorld");

Please follow my toturial and do this....

i will know explain in detail what this code means for the people who dont realy understand...

Messagebox.Show - what this does is once you click your button it will make another little screen that will have your message in it.

(" ") - this brackets are to break your code up and the " " are very imprtant this will be used in the future what they do is tell c# a message is gana be written. if u are gaan write a message it must always start and end with a semi colon "".

; - lastly this is a very imortant code all your codes WILL END WITH THIS; if not you programme will never run it just breaks up a 1 code line to another one. and is very imortant.

Step Six

right so know our code is written go back to your design view, we will test our programme know in debugg view please press F5 on your keyboard and c# will start processing what you write once your the programme appears click your Button1 and a Hello World message will appear



Congraulation you have made your first c# programme

this toutrial was amied for NEWLY bigginers in c# Hope you Enjoyed it Please check regulary i will be making a 2nd toturial on Lesson 2 i will be explanning about IDE and how to change properties of your form buttons and start introducing new toolbars and start getting you more familier in the controls.



if you want to ask questions i am willing to answer them so dont hasitate
Thx for reading.

InsaneCoder
InsaneCoder is offline  
Thanks
7 Users
Old 10/11/2007, 22:38   #2
 
harrypotter2's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 259
Received Thanks: 77
Question

dunno if this should be posted here srrry if it shudnt be but umm wer do i download the pvp private server???
harrypotter2 is offline  
Old 06/07/2008, 01:29   #3
 
johanson75's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 296
Received Thanks: 26
Quote:
Originally Posted by harrypotter2 View Post
dunno if this should be posted here srrry if it shudnt be but umm wer do i download the pvp private server???
***** WOW... all i can say.. as for the tut gj
johanson75 is offline  
Old 06/09/2008, 10:01   #4
 
demeteor's Avatar
 
elite*gold: 0
Join Date: Nov 2007
Posts: 56
Received Thanks: 9
well i would suggest you to start with consol app and the move to visuall c
and again better teach em c++ ^^
one more information combilers have differned syntax some times and sysntax from time
but any nice tut ^^ and how typical hello world ^^
demeteor is offline  
Old 06/09/2008, 12:24   #5
 
verT!c4L's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 1,245
Received Thanks: 60
There are better Tutorials out there, have an eye on your english, for example:

"THIS IS WHERE YOU WILL RIGHT YOUR CODE"

right? *** ****, could it be write ? or wrong ? :P
verT!c4L is offline  
Thanks
1 User
Old 06/09/2008, 13:50   #6
 
demeteor's Avatar
 
elite*gold: 0
Join Date: Nov 2007
Posts: 56
Received Thanks: 9
well you know not everyone is nativa lang is english right ? ****** /> he can been excused if he is not fron england / US


but if his native lang is english then he is unfogivable


btw ist a nice TUTORIAL but he could make better
demeteor is offline  
Old 06/25/2008, 17:30   #7
 
elite*gold: 0
Join Date: Jun 2008
Posts: 4
Received Thanks: 1
could u post the project??
MaSTa1^ is offline  
Old 10/11/2008, 21:17   #8
 
elite*gold: 0
Join Date: Aug 2008
Posts: 1
Received Thanks: 0
Nice job. It is gr8 to c that someone can take the time out of a busy schedule to help others. U rock. Not everyone is willing to help ppl who dont know what they r doing.
BigJugz is offline  
Old 11/06/2008, 18:20   #9
 
elite*gold: 0
Join Date: Nov 2008
Posts: 9
Received Thanks: 3
ty, its helpfull
Hygeru is offline  
Reply


Similar Threads Similar Threads
I Need Help_How can get all programe for make new item and add to navicat?
08/07/2010 - CO2 Weapon, Armor, Effects & Interface edits - 1 Replies
I Need Help_How can get all programe for make new item and add to navicat? pel...i need now i need get yahoo exprince my yahoo is ssll32
Nice Little programe i found
07/19/2010 - EO PServer Hosting - 5 Replies
010 Editor - The Professional Text/Hex Editor with Binary Templates scoop it out
I am looking for a programe
11/13/2009 - Silkroad Online - 2 Replies
YoYo Guys I am Looking for the last edited Media PK2 Can someone here gemme the link to download it on condition that it's not affected or containing any virus Thank you :)
I HAVE THE PROGRAME TBOT BUT ...WHAT NEXT?
12/02/2007 - Silkroad Online - 1 Replies
Hi everyone. I want to use the programe tbot (and i have it) but what should i do next?:confused: Some friends have told me that i have to use " loopback". IF i have to use loopback how is it supposed to be? Can someone explain me how all the proccess to start botting? Thank you :)
Lesson1 - How to make your first c# programe
10/17/2007 - Tutorials - 10 Replies
hi i have decided to do a toturial every week on step to step guide on using c# to the fullest im aiming to get whoever reads my toturials to stage where he can atleast code his own small project on w/e he wishes but im gana go from the real basics to the expert lvl i hope u guys enjoy it. today i will be showing you how to make a C# programe very very basic this will give you a genral idea on some of the stuff on c# this is what you will be needing. you will need following :- a...



All times are GMT +1. The time now is 06:39.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.