The language c#

3340 palavras 14 páginas
15

2

The Language C#

C# (pronounced: see sharp) is Microsoft's new programming language for the
.NET platform. Although .NET can also be programmed in many other languages
(for example, Visual Basic .NET, or C++) C# is Microsoft's preferred language; it supports .NET best and is best supported by .NET.
C# is not a revolutionary new language. It is more a combination of Java, C++ and Visual Basic. The aim has been to adopt the best features of each of these languages while avoiding their more complex features. C# has been carefully developed by a small team lead by Anders Hejlsberg . Hejlsberg is an experienced language expert. At Borland he was the chief designer of Delphi. He is known to design his languages with the needs of practitioners in mind.
In this chapter we assume that the reader already has some programming experience, preferably in Java or C++. While we are explaining the concepts of C# we will also compare them with Java and C++.

2.1

Overview

Similarities to Java
At first sight C# programs look much like Java programs. Any Java programmer should be able to read them. As well as having almost identical syntax the following concepts have been carried across from Java:
K Object-orientation. Like Java, C# is an object-oriented language with single

inheritance. Classes can inherit from just one base class but can implement several interfaces.
K Type safety. C# is a type-safe language. Programming errors that arise from incompatible types in statements and expressions are detected by the compiler. There is no arbitrary pointer arithmetic and no unchecked type casts as in C++. At run time there are checks to ensure that array indices lie in the appropriate range, that objects are not referenced via uninitialized pointers and that a type cast leads to a well-defined result.

16

2

The Language C#

K Garbage collection. Dynamically allocated objects are not released by the

K

K

K

K

programmer, but

Relacionados

  • Teaching course
    1959 palavras | 8 páginas
  • Tutorial c
    824 palavras | 4 páginas
  • Motivação e aprendizagem escolar
    1494 palavras | 6 páginas
  • Prova
    630 palavras | 3 páginas
  • Apostila de c# (programmers heaven)
    12889 palavras | 52 páginas
  • Artigo LFA
    1040 palavras | 5 páginas
  • Exercicios de filosofia
    850 palavras | 4 páginas
  • Teste um
    40208 palavras | 161 páginas
  • Tutorial c#
    419 palavras | 2 páginas
  • Texto 1
    3918 palavras | 16 páginas