Tuesday, 1 May 2018

Characteristics of C#

  1. Simple : C# simplifies C++ by eliminating irksome operators such as ->, :: and pointers. C# treats integer and Boolean data types as two entirely different types. This means that the use of = in place of == in if statements will be caught by the compiler.
  2. Consistent : C# supports an unified type system which eliminates the problem of varying ranges of integer types. All types are treated as objects and developers can extend the type system simply and easily.
  3. Modern : It is modern language due to a number of features it supports like Automatic garbage collection, Rich intrinsic model for error handling, Decimal data type for financial applications, Modern approach to debugging and Robust security model.
  4. Object-Oriented : C# is truly object-oriented. It supports all the three tenets of object-oriented systems, namely, Encapsulation, Inheritance, Polymorphism. The entire C# class model is built on top of the Virtual Object System (VOS) of the .NET framework. In C# everything is an object. There are no more global functions, variables and constants.
  5. Type-safe : It promotes robust programs. C# incorporates a number of type-safe measures.
    • All dynamically allocated objects and arrays are initialized to zero.
    • Use of any uninitialised variables produces an error message by the compiler.
    • Access to arrays are range-checked and warned if it goes out-of-bounds.
    • C# does not permit unsafe casts.
    • C# enforces overflow checking in arithmetic operations.
    • Reference parameters that are passed are type-safe.
    • C# supports automatic garbage collection.
  6. Versionable : Making new versions of software modules work with the existing applications is known as versioning. C# provides support for versioning with the help of new and override keywords. With this support, a programmer can guarantee that his new class library will maintain binary compatibility with existing client applications.
  7. Compatible : C# enforces the .NET common language specifications and therefore allows inter-operation with other .NET languages.
    • C# provides support for transparent access to standard COM and OLE automation.
    • C# also permits interoperation with C-style APIs.
  8. Flexible : Although C# does not support pointers, we may declare certain classes and methods as ‘unsafe’ and then use pointers to manipulate them. However, these codes will not be type-safe.
  9. Inter-operability: C# provides support for using COM objects, no matter what language was used to author them. C# also supports a special feature that enables a program to call out any native API.

0 comments:

Post a Comment

Introduction to C# .NET

It  is  pure  object  oriented  programming  language.  Also  it  is  Event Driven Programming Language. It is case sensitive. ...