Results 1 to 10 of 10
-
25th Jun 2010, 05:06 PM #1OPMember
C# Basics I - Classes in C#
Classes in C#
Consider the following code example, which defines a class:
Code:public class Hello { public static void Main(string[] args) { System.Console.WriteLine("Hello, World! \n"); } }
The Main() Function
The first line of code that a C# compiler looks for in the source file compiled is the Main() function. This function is the entry point of the application.
The Main() function is ideally used to create objects and invoke member functions.
The class Keyword
The class keyword is used to declare a class. Keywords are reserved words that have a special meaning. Here, the class keyword defines the class Hello. The braces, known as delimiters, are used to indicate the start and end of a class body.
Example:
Code:class Hello { ... }
The class keyword is followed by the name of the class. In the preceding example, Hello is the name of the class defined by using the class keyword. When you create classes, you must consider the following naming conventions and rules.
- Should be meaningful (strongly recommended).
- Should ideally be a noun.
- Can use either the Pascal case or Camel case.
NOTE: THIS TUT IS KINDA CONTINUED IN MY NEXT TUT. Click here to view my next tut.iFlames Reviewed by iFlames on . C# Basics I - Classes in C# Classes in C# Consider the following code example, which defines a class: public class Hello { public static void Main(string args) { System.Console.WriteLine("Hello, World! \n"); } Rating: 5
-
25th Jun 2010, 05:18 PM #2Member
Now when did you learn these?
Well looks good teach me too please.I am the TharkiBaba >_> Oh well thats my websites name -_-
-
25th Jun 2010, 05:19 PM #3OPMember
i just started learning C# eso
i dont think you can afford my fee
---
oh btw thread updated and will keep on updating
-
25th Jun 2010, 05:22 PM #4Member
Please teach me or else die
Aah I know you will help me further champ.
Well good luck learning C# its very easyI am the TharkiBaba >_> Oh well thats my websites name -_-
-
25th Jun 2010, 05:23 PM #5Retired NinJaWebsite's:
loledhard.comNice Start Good work in good Direction. Best of Luck
You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!
-
25th Jun 2010, 05:28 PM #6Member
Nice start
I am too gonna start soon with it
Hope to see more tuts from you & others for easy learning step by step
-
25th Jun 2010, 06:02 PM #7Member
I am currently learning C++ in school
-
25th Jun 2010, 06:12 PM #8Banned
classes in C++ is easy... C# everythng goes way above my head..sad..
-
25th Jun 2010, 06:16 PM #9Respected Developer
Are you gonna hate on C# for no reason in every post sniper? Tell me, what about C++ classes do you think is easier?
-
29th Jun 2010, 05:33 PM #10MemberWebsite's:
FlowForums.comC# is very easy to me anyways. How is it way above your head?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
C++ Basics [Lesson 1]
By NucleA in forum Web Development AreaReplies: 7Last Post: 3rd Jan 2011, 07:15 AM -
What is the point of the php extends in relation to classes?
By timtamboy63 in forum Web Development AreaReplies: 11Last Post: 16th Oct 2010, 07:59 AM -
Protect your Server. The Basics! (cPanel)
By Storming in forum Technical and Security TutorialsReplies: 1Last Post: 16th Aug 2009, 07:36 PM -
PHP Tutorial (Creating Classes)
By litewarez in forum Tutorials and GuidesReplies: 0Last Post: 14th May 2009, 11:40 AM -
PHP Tutorial (Loopy Loops) Basics
By litewarez in forum Tutorials and GuidesReplies: 0Last Post: 12th May 2009, 12:53 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...