What Is C#?
C# is type-safe object-oriented language
Enables developers to build a variety of
secure and robust applications
It was developed by Microsoft within the .NET
You can use C# to create traditional Windows
client applications, XML Web services,
distributed components, client-server
applications, database applications, etc…
The language provides support for software
engineering principles such as strong type
checking, array bounds checking, automatic
garbage collection, etc…
Design Goals (contd.)
Intended to be suitable for writing
applications for both hosted and embedded
systems, ranging from the very large that use
sophisticated operating systems, down to the
very small having dedicated functions.
Was created in 1999 by principal designer
and lead architect of Microsoft Anders
Has gone through several versions currently
at version 4.0(released 2010)
Very similar in syntax to C, C++, and Java.
Syntax is highly expressive.
Key features: nullable value type,
enumerations, delegates, lambda
expressions, and direct memory access
Governing Standards Body
In 2000 Microsoft co-sponsored the
submission of the language to the ECMA
International and has been approved as a
standard by the ECMA since 2001.
Likewise C# became an ISO standard in
“Interop” process enables C# programs to do
almost anything that a native C++ application can
Ease of Use
Syntax allows for users familiar with C, C++, or
Java to easily start coding in C# very effortlessly.
Progression of versions gives the user the feeling
of reliable mature standard.
Support of Community
It approval from the ISO and ECMA as well as
development support from Microsoft give the
standard elite standing.
Microsoft uses C# in its Base Class Library
(BCL) which is the foundation of its
proprietary .NET framework.
Proprietary features may deter other idependent
implementations of the full framework.
C# programs run on the .NET Framework
which is an integral component of Windows
that includes a virtual execution system
called common language runtime (CLR).
Likewise C# programs run on a unified set of
class libraries as well.
Source code relationships
The following diagram
illustrates the compile-
time and run-time
relationships of C#
source code files, the
.NET Framework class
and the CLR.
Example source code
The following code
illustrates how to
connect to a SQL
Databases using C#
C# is an elegant and type-safe object-
oriented language developed by Microsoft.
Advantages vs. Disadvantages?
Advantages out weigh the disadvantages.
Proven reliable standard approved by the ISO &
Proprietary to Microsoft.
The future for the language is promising
continuing with updating versions.