Sie sind auf Seite 1von 2

C#.

NET
SIMPLE,MODERN,INTER OPERABILITY,TYPE SAFE PROGRAMMING LANGUAGE

C# is a modern language which enables the developer to build a robust


application or web application in quick and easy way.
It is a comprehensive language with many advanced features, especially in version
2.0 such as generics.
It is derived from C++ and Java.

C# is Type Safe Language. A programming language is type safe when the


language defines the behavior or certain rule set of permission for when the
programmer treats a value as a type to which it does not belong.
For Example

Above example will cause an error for all statements because we cannot add string
to integer (cannot implicitly covert type string to int) same way for integer to string
and double to int and so on.
The C# language compilers always produce type safe code, which is verified to be
type safe during JIT compilation.

Why Type-Safety is Important?


Type safe code can access only the memory locations that it has permission to
execute.
Type-safety is important for assembly isolation and security enforcement.
Type safe code cannot read or access values of the private members from another
objects scope
It accesses types only in well-defined, allowable ways, thereby preventing overrun
security breaches.

Type safety helps isolate objects from each other and therefore helps protect them
from inadvertent or malicious corruption. This isolation helps ensure that assemblies
cannot adversely affect each other and it increases application reliability.
How Type Safety Ensured
When a code runs on CLR (Common Language Runtime) it performs the type safe
check called type safe verification and this is done during Just in Time Compilation
(JIT) by a tool called peverify.exe.

C# is an Inter operability Language


C# includes native support for the COM and windows based applications.
C# allows us to use pointers as unsafe code blocks to manipulate our old unsafe
code. Unsafe code for example accessing Microsoft word.
C# can directly access components from vb.net and from other managed code
languages runs on CLR.For example if we write a program in VB.NET that program
we can access it in C# too by using DLL of vb.net program.

C# Versionable
.NET framework handles the versioning.
Since C# code which runs on .NET framework so it is a versioning language.
In simple words we can upgrade code of an existing running application (i.e.
creating a new "DLL" with new version) and that upgraded code we can deploy in
the same application without any conflict with the old existing code (Since old code
is using different or old version).
We can have different versions of the same component at the same time and our
applications will know automatically which version to use and what version not to
use.
Note: Versioning is done only on assemblies with strong names.