(C#) Chapter - 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Chapter 1

The C# Environment
Introduction to .Net Framework
Origins of .NET Technology
.NET Technology Procedure
Overview of the .NET Framework
Common Language Runtime Assemblies
.NET Framework Class Library
Goals of .NET
Benefits of .NET Approach
Introduction to .Net Framework
.NET Framework is a layer positioned between the Microsoft
Windows operating system and your applications.

Net Framework give services to write application with languages


(C++, C#, VB, other ).

 Include everything required for developing software for the following


types of applications and services:
Application
Console applications.
Windows GUI applications
.NET Framework
(Windows Forms).
Web applications.
Windows OS
XML Web services.
Windows services.
Origins of .NET Technology

Phase I OLE
Early 1990s
Technology

Phase II
Early 1995s
COM
Technology

Phase III
Late 1990s .NET
Technology
OLE Technology

Object Linking and Embedding Technology

Linking
O1 O1

Embedding
O2 O2

Application A Application B
COM Technology

 Component Object Model

Component 1 Component 2 Component 3

Main Application
.NET Technology
 Third-generation component model

C# Component 1 VB.NETComponent C++


2 Component3

MSIL

Main Application
.NET Technology Procedure

C# Component 1 VB.NETComponent C++


2 Component3

Assembly Assembly Assembly

MSIL(Microsoft Intermediate Language )

JUST-IN-TIME(JIT) Complier is supported by CLR (Common


Language Runtime)

Managed Code
Overview of the .NET Framework
 Consists of two main components :

1. Common Language Runtime


2. NET Framework class library
Common Language Runtime
Assemblies
 logical unit of deployment contains manifest,
metadata, MSIL and resources

 Manifest
metadata about the components in an assembly (version,
types, dependencies, etc.)

 Type metadata
completely describes all types defined in an assembly:
properties, methods, arguments, return values,
attributes, base classes, …
.
Common Language Runtime
Assemblies
Microsoft Intermediate Language
MSIL or IL all languages compile to IL (managed code)
IL is always compiled to native code/managed code
before being executed
Just In Time (JIT) compilation

Resources
data, images, audio, etc.
CL R
CTS

CLS

CTS – (Common Type System)


 data type bit/byte အေရအတြက္ ျပန္ညွိေပး

CLS – (Common Language Specification)


 မတူညီတဲ့ syntax ရဲ့ rule ေတြကို define ျပန္လုပ္ေပး
CTS – (Common Type System)
• Part of the CLR
• Defines how types are declared, used, and managed in the
runtime
• Supports two general categories of types
– Value Types
– Reference Types
• Defines how memory for structures and classes is
allocated
• Allows components developed in different languages to
operate together
• Enforces type safety
CLS – (Common Language
Specification)
• The CLS is a subset of the CTS
• CLS is a set of basic language features needed by
many applications and rules for using them, has
been defined
• CLS
– Defines rules for naming variables
– Defines primitive data types
– Supports 0-based arrays
– Specifies rules for arguments list
– Prohibits unsigned numeric data types
.NET Framework Class Library

System.Web System.Windows.Forms
Services UI Form Button
Description HtmlControls MessageBox ListControl
Discovery WebControls
Protocols System.Drawing
Caching Security Drawing2D Printing
Configuration SessionState Imaging Text

System.Data System.Xml
OLEDB SQL XSLT Serialization
Design SQLTypes XPath

System
Collections IO Security Runtime
Configuration Net ServiceProcess InteropServices
Diagnostics Reflection Text Remoting
Globalization Resources Threading Serialization
To unify desktop and Web programming

Desktop Programming Web Programming


- ASP (not object-
- Object-oriented oriented)
- Compiled (C/ C++, - Interpreted (VBScript,
Fortran, …) Javascript, PHP,…)
- Class Library - Special Library

Desktop and Web Programming


- Object-oriented (ASP.NET)
- Compiled (C/ C++, VB.net, Fortran, …)
- Uniform Class Library
Benefits of .NET Approach
• Simple and faster systems development
• Rich object model
• Enhanced built-in functionality
• Many different ways to communicate with the outside
world
• Integration of different languages into one platform
• Easy deployment and execution
• Wide range of scalability
• Interoperability with existing applications
• Simple and easy-to-build sophisticated development tools
• Fewer bugs
• Potentially better performance
Supported
Internal .NET
Product name Codename Release date
version Framework
versions

Visual Studio 2.0, 3.0, 3.5,


Dev10/Rosario 10.0 April 12, 2010
2010 4.0

2.0, 3.0, 3.5,


Visual Studio September 12,
Dev11 11.0 4.0, 4.5, 4.5.1,
2012 2012
4.5.2

2.0, 3.0, 3.5,


Visual Studio October 17,
Dev12 12.0 4.0, 4.5, 4.5.1,
2013 2013
4.5.2

You might also like