Introduction To
Introduction To
Introduction To
Chapter 1
Introduction to .net
• What is .Net?
• .Net Framework
• CLR
• Visual Studio.Net & .Net Languages
• Integrated Development Environment
• Project types
• C#.Net history & design Goals
• How C# differs from C++
Introduction to .Net or What is .Net?
• Multilanguage support
• Automatic resource management
• Simplification of application deployment
• Security
• Object oriented model
.Net Framework
• It is an application execution environment that is
ideal for the development, deployment and
execution of applications on Windows platform.
ASP.NET Windows Forms
(Web services) (User interface)
Library (BCL)
d. Managed Code
a. Common Type System(CTS)
1) Value types
• Ex. int, float, double etc.
2) Reference types
• Ex. class, interface, delegate, string etc.
b. Common Language Specification(CLS)
JIT compilation:
• Before executing on the target machine, MSIL has to be
translated into the machines native code.
• This can either be done before the application is called or
at runtime.
• At runtime, the translation is done by a Just–In-Time
Compiler(JIT)
d. Managed code
• Data that is under the control of the CLR garbage
collection process is called managed code. OR
• The code that satisfies the CLR at run time is
called as managed code.
2. Framework base classes or Base Class Library
Class name
Namespace Method name
name
3.User and program interfaces
The .Net framework provides the following tools for managing user and
application interfaces:
i) Windows forms:
Ex. Windows forms (C#.Net , VB.Net) is the form generator for client-side
applications.
ii) Console applications:
Ex. Console applications are useful for logging or other text based
activities.
iii) Web Forms:
Ex. ASP.Net is used to create dynamic Web applications.
• These tools enable users to develop user friendly
desktop based as well as web based applications
using a wide variety of languages on the .Net
platform.
.Net Languages
We can use number of languages for
developing .Net applications .These are:
• Visual Basic
• Visual C++
• Visual C#
History of C#
Windows Control -If the controls that come with Visual Studio
Library don’t provide the functionality you need, you
can built your own custom control.
C++ does not have finally block C# has finally block in exception
in exception handling handling .The code statement in
the finally block will be executed
irrespective of exception
occurrence.
C++ has the concept of function C# does not have the concept of
pointer function pointer. C# has a similar
concept called delegate.
• Characteristics of C#.Net
1. Simple
2. Consistent CTS
3. Modern
4. Object oriented
5. Type safe
6. Versioning
7. Compatible languages concepts
1. Simple
• C# simplifies C++ by eliminating complex operators
like ::,,.*,::* etc. and pointer concept.
• C# treats the data types as per their use and range.
2. Consistent
• C# supports a Common Type System which
eliminates the problem of varying ranges of data
types.
• It also allows the developers to extend the type
system.
3. Modern
• Inheritance
• Polymorphism
5.Type safe
• C# reports a number of type safe measures on
dynamically allocated objects
• Use of any uninitialized variable produces an
error message by the compiler
• Access to arrays are range checked and warned
if it goes out of bound
• It enforces overflow checking in arithmetic
operations
6. Versioning
• Making new versions of software modules to work
with the existing application is known as
versioning.
• C# provides support for versioning.
7. Compatible
C# enforces the .Net Common Language
Specification(CLS) and therefore allows
interoperation with other .Net languages