|
997191243.html
C# Language
Many features of C# were designed in response to the strengths and
weaknesses of other programming languages, particularly Java and C++. The C#
language specification was written by Anders Hejlsberg and Scott Wiltamuth.
Anders Hejlsberg is famous for creating the Turbo Pascal compiler and leading
the team that designed Delphi.
The main key features of the C# language are the following:
1. C# has been designed to make component building easy and provides
component-oriented language constructs such as properties, events, and
declarative constructs called attributes.
2. C# is localized to the declaration itself, rather than being spread
across several source files or several places within a source file. Types do not
require additional declarations in separate header or Interface Definition
Language (IDL) files, a property's get/set methods are logically grouped,
documentation is embedded directly in a declaration, etc.
3. For Versioning C# provides features such as explicit interface
implementations, hiding inherited members, and read-only modifiers. They help
new versions of a component work with older components that depend on it.
4. C# build to ensure that variables can be accessed only through the type
associated with those variables. This encapsulation encourages good programming
design and eliminates potential bugs or security breaches.
5. C# data types, including primitive types, derive from a single base
type, providing a unified type system. This means that those data types
(structs, interfaces, delegates, enums, and arrays) share the same derived
functionality, such as the ability to be converted to a string, serialized, or
stored in a collection.
6 .C# relies on a runtime that performs automatic memory management. This
makes easier on programmers to dispose objects, it eliminates problems such as
dangling pointers, memory leaks, and coping with circular references. C# still
utilize pointers: it merely makes them unnecessary for most programming tasks.
For performance-critical hotspots and interoperability, pointers may be used,
but they are only permitted in unsafe blocks that require a high security
permission to execute.
7. Leveraging of the Common Language Runtime (CLR) is a big advantage of C#
over other languages. Many aspects of C# alias the CLR, especially its type
system, memory-management model, and exception-handling mechanism.
|