Wednesday 1 January 2014

INTRODUCTION to C# LANGUAGE :

- C# is a modern, general-purpose, object oriented programming language developed by Microsoft & approved by ECMA & ISO.
- C# was Developed by 'Anders Hejlsberg' & his team during the development of .NET Framework.
- C# is  designed for Common Language Infrastructure(CLI), which consists of the executable code & runtime environment that allows use of various high-level languages to be used on different computer platforms & architectures.

"Why C# can be pronounced as "C-sharp" not "c hash""...?

The name "C sharp" was inspired by musical notation where a sharp indicates that the written note should be made a semitone higher in pitch. This is similar to the language name of C++, where "++" indicates that a variable should be incremented by 1.

Due to technical limitations of display (standard fonts, browsers, etc.) and the fact that the sharp symbol (U+266F ♯​ music sharp sign (HTML: ♯)) is not present on the standard keyboard, the number sign (U+0023 #​ number sign (HTML: #)) was chosen to represent the sharp symbol in the written name of the programming language. This convention is reflected in the ECMA-334 C# Language Specification. However, when it is practical to do so (for example, in advertising or in box art), Microsoft uses the intended musical symbol.

The "sharp" suffix has been used by a number of other .NET languages that are variants of existing languages, including J# (a .NET language also designed by Microsoft which is derived from Java 1.1), A# (from Ada), and the functional F#. The original implementation of Eiffel for .NET was called Eiffel#, a name since retired since the full Eiffel language is now supported. The suffix has also been used for libraries, such as Gtk# (a .NET wrapper for GTK+ and other GNOME libraries), Cocoa# (a wrapper for Cocoa) and Qt# (a .NET language binding for the Qt toolkit).

Reasons which make C# a widely used professional language:

 - Modern general-purpose programming language.
- Object Oriented.
- Component Oriented.
- Easy to learn.
- Structured language.
- It can be compiled on variety of computer platforms.
- Part of DOT NET Framework.

Strong Programming features of C# :

- C# closely follow traditional high-level languages C & C++ & being an OOP language, it has strong resemblance with java.
- Automatic Garbage Collections.
- Standard Library.
- Assembely Versioning.
- Properties & Events.
- Delegated & Events Management.
- Easy-to-use Generics.
- Indexers.
- Conditional Compilation.
- Boolean Conditions.
- Simple Multithreading.
- LINQ & Lambda Expressions.
- Integration with windows.

C# Program Structure :

A C# program basically consists of the following parts:

- Namespace Declaration.
- A class.
- Class Methods.
- Class Attributes.
- A main Method.
- Statements & Expressions.
- Comments.

No comments:

Post a Comment