Page 9 - DCAP505_MODERN_PROGRAMMING_TOOLS_AND_TECHNIQUES_II
P. 9

Unit 1: Introduction to C#




          3.   Common run-time environment: .NET is equipped with a common run-time environment   Notes
               that can be seamlessly shared by all the .NET-aware languages.
          4.   Base class library: The incompatible API has been dressed into a consistent system of APIs
               making calls to methods uniform. The object model has also been redesigned to offer a
               uniform object interaction.
          5.   Simplified COM: The complex interfaces like IclassFactory, Iunknown, IDL code and the
               difficult data-types like BSTR, SAFEARRAY etc. have been done away with in .NET.

          6.   Simplified deployment mechanism: The much horrifying requirement for an object to be
               registered into the system-registry before it could be used on a machine has been completely
               removed. The .NET run-time environment takes care of all these and more. Also, a multiple
               version of the same DLL can exist and be accessed at the same time.

          1.1 What is C#?

          The needs of a computer programmer and the  features they  demand from a programming
          language keep on changing with time. Once C was supposed to be answer to all the questions in
          programming. Though to some extent it is true, yet the need of simpler programming languages
          was immediately felt. This very fact has compelled the programming language designers to
          continuously revise the existing programming languages. The rapid pace of improvements in
          related technologies demands that programming tools must improve even more rapidly to catch
          up with them. This is a continuous process and in this process comes a point where a revised
          version of a language is so much detached from the original counterpart that it takes form of an
          altogether new language.
          Due to ongoing struggle for creating the ultimate programming language we have ended up having
          so many programming languages today - one catering to a specific need better than the others.
          Latest in the sequel of this evolutionary development, Microsoft introduced a new programming
          language represented symbolically as C# and pronounced see-sharp. In the recent past it was
          observed that both languages C and C++ were very popular among programmers due to the
          programming-power they provided to them. However, Visual Basic was found to be popular
          because of its simplicity. Some languages have much desirable features while lack in other useful
          features. In short, no single computer language has all the features that a modern computer
          would like it to have. C# is an attempt of Microsoft to provide just that.
          The designers of C# have lifted good features from the existing programming languages and
          alleviated them from arcane drudgery by reducing the limitations or removing them completely.
          Let us have a look at what limitations in existing programming languages are and how C# enables
          the programmers to overcome them.

          z z  C# has retained the code-simplicity of Visual Basic. VB programmers would not feel the
               migration- pain while shifting to C#. VB suffered severely from its limited OOP capabilities.
               C# offers true OOP capabilities to the VB programmers without sacrificing the simplicity
               of the code.
          z z  C#  has  a  significant  resemblance  with  the  syntax  of  C++  and  Java.  It  has  retained  the
               usability of OOP and API that C++ provides but has done away with the much error-prone
               memory management, much difficult pointer manipulations and incomprehensible code-
               structures. C++ programmers have long waited for these enhancements.

          z z  Java programmers felt handicapped when they wanted to use the existing codes written
               in alien languages. Though Java offers platform-independence it is not truly language-
               independent. A Java application has to be written in Java end-to-end. It has very limited
               capability to use non-Java API’s. C# heralds a good news to Java programmers by providing
               seamless integration with millions of lines of codes written in non-Java languages.




                                           LOVELY PROFESSIONAL UNIVERSITY                                     3
   4   5   6   7   8   9   10   11   12   13   14