Saturday 24 May 2014

C # An Introducation

C# (pronounced as 'C Sharp') is a programming language develop by Microsoft  Corporation. C# is fully object oriented programming language  like Java and is the first Component - oriented language. it has been designed to support the key features of .Net Framework, the development platform  of Microsoft for building component based software solutions.

  • It is new language derived from the C/C++ family.
  • It simplifies and modernizes C++
  • It has a lean and consistent syntax
  • Major parts of .Net Framework are actually coded in C#
CHARACTERISTICS OF C#

The language that is designed for both computing and communications in characterized by several key features. It is 
  • Simple
  • Consistent
  • Modern
  • Object-oriented
  • Type-safe
  • Versionable
  • Compatible
  • Interoperable
  • Flexiable
Type Safe:
Type safe promotes robust programs. C# incorporates a number of type safe measures
  • All dynamic allocated objects and arrays are initialized to zero
  • Use of any uninitialized variables produces an error messages by the compiler
  • Access to arrays are range checked an warned if it goes out of bounds
  • C# does not permit unsafe casts
  • Reference parameters that are passed are type safe
  • C# supports automatic garbage collection
Versionable:
Making new  versions of software modules work with the existing applications is know as versioning. C# provides support for versioning with the help of new  and override keywords. 

HOW DOES C# DIFFER FROM JAVA ?
  1. C# has more primitive data types
  2. Unlike Java, C# datatypes are objects
  3. Arrays are declared differently in C#
  4. Java uses static final to declare a class constant while C# uses const.
  5. C# supports structure type and Java does not
  6. Java does not provide operator overloading
  7. Java does not directly support enumerations
  8. Java does not have any equivalent to C# indexers. 
  9. C# does not allow free fall through from case to case
  10. C# checks overflows using checked statements
  11. C# allows a variable number of parameters using the params keywords.

No comments:

Post a Comment

stats counter
your visitor number