Saturday, May 4, 2013

Basics in C#



Simple, modern , object oriented and type safe language.

Type safe - Type safety means that the compiler will validate types while compiling, and throw an error if you try to assign the wrong type to a variable

It is from C family. Immediately familiar to C, C++ and Java.

C# standardized by ECMA and ISO/IEC

ECMA - European Computer Manufacturers Association  : Ecma aims to develop standards and technical reports to facilitate and standardize the use of information communication technology and consumer electronics; encourage the correct use of standards by influencing the environment in which they are applied; and publish these standards and reports in electronic and printed form
 
Supports for component oriented programming

The basic coding unit of C# is a class. Both data members and methods (functions, procedures) must be defined within a class. The class itself is the basic unit of a component. A class must define within a namespace.
The namespace concept in C# (a way of organizing custom design classes, interfaces, struts, and enums) actually fit perfectly with a Component.
It has everything necessary to write components:
  •      Attributes
  •         Properties   
  •         Events   
  •         Interfaces
That's basically all you need for a component-based architecture.

Garbage collection automatically reclaims memory occupied by unused objects.

Exception handling provides a structured and extensible approach to error detection and recovery.

C# has a unified type system-

All C# types, including primitives (int,double etc), inherit from a single root “Object” type.
All types share a set of common operations, and values of any type can be stored, transported, and operated upon in a consistent manner

Versioning in C#’s design.