Sunday, October 2, 2011

С# (C-Sharp) - object-oriented programming language


 


      C # (pronounced C-Sharp) - object-oriented programming language with a secure system for typing platform. NET. A Heylsberhom Anders, Scott and Peter Golde Viltamutom under the auspices of Microsoft Research (with firm Microsoft).
      C # syntax similar to C + + and Java. It has a strict static typification, supports polymorphism, overloading operators, pointers to function members of classes, attributes, events, properties, exceptions, comments in XML. Pereynyavshy many of his predecessors - like C + +, Delphi, module and Smalltalk - C #, based on the practice of their use, excludes some models that have proven to be problematic in developing software systems: yes, C # does not support multiple inheritance of classes ( Unlike C + +) or output types (in contrast to Haskell).

      History of ...

        C # is a very close to the programming language Java. The language Java was created by Sun Microsystems, when the global development of the Internet made the task of computing facilities scattered. Based on the popular language C + +, Java has excluded it from potentially dangerous items (such as pointers, without going beyond). For facilities scattered computing concept was created virtual machine and machine-independent byte-code, a kind of mediator between source code and hardware instructions a computer or other device.
Java has acquired considerable popularity, and was also licensed by Microsoft. But over time, Sun began to blame Microsoft, and that before creating a clone of Java makes it compatible only with platform Windows, what supeprechyt very concept of machine-independent execution environment and violates the license agreement. Microsoft refused to meet the requirements of the Sun, and therefore determine the relationship has taken on trial. The Court found the position of fair Sun, and ordered Microsoft to abandon pozalitsenziynoho use Java.
In this situation, Microsoft decided to use their weight on the market, create your own analogue of Java, the language in which the corporation will povnovlasnym master. This newly created language called C #. She inherited the concept of Java Virtual Machine (environment. NET), the bytecode (MSIL) and more security source code, plus take into account the experience of programs in Java.
An innovation was the ability to C # easier interaction, compared to the predecessor languages, code programs written in other languages ​​that are important in creating large projects. If the program in different languages ​​running on the platform. NET,. NET is the charge on application compatibility (ie, data types, with the final score).
As of today, C # language defines flagship corporation Microsoft, because it most fully exploits new opportunities. NET. Other programming languages, although supported, but recognized as having hereditary gaps to use. NET.


Name of language

      The # in the name of the language can be interpreted also as two pairs of pluses + +, that hint at a new step in language development compared to C + + (like the step from C to C + +), and as a musical symbol sharp, along with the letter C, which is in English to name the notes-sharp. The latter gave the name of the language. Despite the fact that the symbol # (oktotorp) is actually a symbol to indicate the number of most keyboards and different from the sharp symbol ♯ (Unicode U +266 F), Microsoft, as the author of the language, have repeatedly appealed to their customers asking to take such styling.


Features of Language 

      C # was developed as a programming language for application-level CLR and, as such, depends primarily on the capabilities of the CLR. This applies, above all, types of C #. The presence or absence of certain features of expressive language is dictated by whether a particular linguistic feature to be broadcast in the relevant design CLR. Thus, the development of CLR version 1.1 to 2.0 significantly enriched himself C #; such interaction should be expected to continue. (However, this pattern is broken with the release of C # 3.0, which is a language extension that does not rely on the extension platform. NET.) CLR provides C #, like all others. NET-oriented languages ​​has many features that may be deprived of "classic" programming languages . For example, garbage collection is not implemented in the C #, and CLR performed for programs written in C # exactly as it is done for programs in VB.NET, J #, etc..


Example «Hello, World»

using System;
 
class ExampleClass
{
  static void Main()
  {
    Console.WriteLine("Hello, world!");
  }
}



No comments:

Post a Comment