06-06-2013, 03:55 PM
Overview of C#
Overview of C#.ppt (Size: 176 KB / Downloads: 15)
Introduction
C# seems a strange name
Perhaps Microsoft named it because they want it to be more better, smarter and ‘sharper’ than C, C++
The Main method
Every C# program must include the Main() method in one of it’s class
This is starting point for executing program
C# program can have any number of Classes , but ‘Only One’ class can have the Main() method
It contains three keywords : public, static and void
Public
It is an access modifier, which tells that Main() method is accessible by anyone
Static
Keyword static declares that Main() method is global , and it can be called without creating instance of class (Object)
The compiler stores the address of Main method as entry point
Void
It tells that Main method does not returns any value
Multiple Main Methods
As we state earlier , one of the class must have Main method , that is normally expected
But C# include the feature that enables us to define more than one class with the Main method
Since Main is an entry point of the program , so there should not more than one entry point
Program Coding Style
C# is a free from language
We do not need to take care of line or spaces when we are coding the program