- Like C, C++, C# is case-sensitive.
- Semi colon (;) is the statement separator.
- All code (class declaration and implementation) is placed in one file with extension cs.
- Have a look at this Hello world program in C#.
using System; namespace MyNameSpace { class HelloWorld { static void Main(string[] args) { Console.WriteLine ("Hello World"); } } }
- Everything in C# is packed into a class and classes in C# are packed into namespaces (just like files in a folder).
- C#'s main function starts with name Main.
- No need to put a semi colon after a class block or struct definition.
C # (C Sharp) basics
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment