C# Overview and Features

basiliskcanoeSoftware and s/w Development

Nov 2, 2013 (3 years and 5 months ago)

61 views

C# Overview and
Features

Content

I.
History of C#

II.
Architecture

III.
How to install

IV.
Features

V.
Code Sample

VI.
Microsoft .NET Platform

VII.
Why use C#

VIII.
Conlusion

What is C#?


C# ( pronounced as C
-
sharp ) is a new Java like
language from Microsoft. Microsoft says that
C# is a language with the power of C++ and
simplicity of Visual Basic. C# supposed to be
the best language for Microsoft's .NET
programming.

History



In August, 2000, Microsoft, Hewlett
-
Packard and Intel
co
-
sponsored the submission of specifications for the
Common Language Infrastructure (CLI) and C#
programming language to the international
standardization organization ECMA


During next year the specifications were formulated
into standards.


In December, 2001, the ECMA General Assembly
ratified the 1st edition of the C# and CLI standards as
ECMA
-
334 and ECMA
-
335

History II


In April, 2003, ISO ratified the standards


Work at ECMA on the next edition of the
Standards is already underway



Architecture


Common Language Runtime


manages code execution


provides services


Compiler


C# compiler is part of .NET Framework SDK


generates
MSIL + Metadata


CPU specific Code (JIT)


Because the runtime supplies one or more JIT
compilers for each computer architecture it supports,
the same set of MSIL can be JIT
-
compiled and
executed on any supported architecture


How to install


Install Windows 2000 and IE 5.5.


Install Microsoft .NET Framework SDK.
Microsoft has it on MSDN site.


After installing these you can write your code in
any text editor and save it as .cs extension.


To run the program use the csc command like

csc c:
\
myprogram.cs


Features


Garbage collection relieves the programmer of
the burden of manual memory management.


Variables in C# are automatically initialized by
the environment.


Managed execution environment


Variables are type
-
safe.


native support for the Component Object
Model (COM) and Windows®
-
based APIs.


Built in versioning

Features II


Restricted use of native pointers


With C#, every object is automatically a COM
object


Platform and language independent


Inside a specially marked code block, developers
are allowed to use pointers and traditional
C/C++ features such as manually managed
memory and pointer arithmetic.


Features III


Compiler allows use of initialised Variables only


Strong exception handling


Full XML support


Suited well for building Web Services


Array bounds checking


The language is intended for use in developing
software components suitable for deployment in
distributed environments.


Microsoft .NET Platform


Huge library of Functions


Collection of classes


Windows Application Framework


Web Framework for ASP.NET


Provides access to many kinds of Devices


Developed mainly in C# itself

Why use C#


Full COM/Platform support for existing code integration.


Robustness through garbage collection and type safety.


Security provided through intrinsic code trust mechanisms.


Full support of extensible metadata concepts.


You can also interoperate with other languages, across platforms,
with legacy data, by virtue of the following features:


Full interoperability support through COM+ 1.0 and .NET
Framework services.


XML support for Web
-
based component interaction.


Versioning to provide ease of administration and deployment.


Conclusion

C# is a modern, object
-
oriented language that
enables programmers build solutions for the
Microsoft .NET platform. The framework
provided allows C# components to become
XML Web services that are available across the
Internet, from any application running on any
platform.