SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Visual C# .Net using
framework 4.5
Eng. Mahmoud Ouf
Lecture 01
mmouf@2017
Introduction to .Net Framework
‱ The development of .Net Framework started the late 1990.
‱ First version was released early 2002.
‱ Through the 15 years it passes 8 upgrades
‱ Some of these upgrades was released with new version of Visual
Studio.Net.
mmouf@2017
Introduction to .Net Framework
Framework version Release date Development tool
1.0 13/02/2002 Visual Studio .Net 2002
1.1 24/04/2003 Visual Studio .Net 2003
2.0 07/11/2005 Visual Studio .Net 2005
3.0 06/11/2006 Visual Studio .Net 2005
3.5 19/11/2007 Visual Studio .Net 2008
4.0 12/04/2010 Visual Studio .Net 2010
4.5 15/08/2012 Visual Studio .Net 2012
4.6 20/07/2015 Visual Studio .Net 2015
mmouf@2017
Overview of .Net Framework
Common Language Runtime (CLR)
Framework Class Library (FCL)
WinForm ASP.NET ADO.NET
2.0
WPF WCF WF InfoCard
LINQ Entity Framework
Parallel LINQ Task Parallel Library
.Net APIs for store/uwp Task based Async model
3.0
3.5
4.0
4.5
mmouf@2017
Common Language Runtime (CLR)
Class Loader
MSIL to native
compiler
Code manager
Garbage
collector
Security Engine Debug Engine
Type Checker Exception Manager
Thread support COM Marshaler
Base Class Library (BCL) support
mmouf@2017
From source code to executable
C# Code
VB.Net Code
Managed C++
Code
C# Compiler
VB.Net
Compiler
Managed C++
Compiler
MSIL, CIL (IL)
PE file (dll, exe)
mmouf@2017
.Net Framework 1.1
1. Built in support for mobile ASP.Net controls
2. Enables Code Access Security in ASP.Net application
3. Built-in support for ODBC and Oracle Database
4. .Net Compact Framework
5. Support Internet Protocol version 6 (IPv6)
mmouf@2017
.Net Framework 2.0
1. Full 64-bit support
2. Numerous API changes
3. Microsoft SQL Server integration
4. Additional and improved ASP.Net web controls
5. New personalization features for ASP.Net
6. Partial classes
7. Nullable types
8. Anonymous methods
mmouf@2017
.Net Framework 3.0
1. Windows Presentation Foundation (WPF)
2. Windows Communication Foundation (WCF)
3. Windows Workflow Foundation (WF)
4. Windows CardSpace
mmouf@2017
.Net Framework 4.0
1. Parallel Extension to improve support of parallel programming
2. New Visual basic and C# features
3. Include new types
4. Introduced Common Language Runtime (CLR) 4.0
mmouf@2017
.Net Framework 4.5
1. .Net for Metro Style apps
2. Managed Extensibility Framework (MEF)
3. Core Features
4. ASP .Net
5. Networking
mmouf@2017
.Net Framework 4.6
1. Just In Time (jit) compiler for 64 bit system
2. WPF and Windows Forms both have been updated for high DPI
scenarios
3. Support for TLS 1.1 and TLS 1.2 has been added to WCF ASP .Net
4. The cryptographic API in .NET Framework 4.6 uses the latest
version of Windows CNG cryptography API.
mmouf@2017
Structure of C# program
‱ In C#, an application is a collection of one or more classes.
‱ The classes for a C# application can be written in more than one file
and multiple classes can be put in one file. One class could be written
in multiple files (partial class).
class HelloWorld
{
public static void Main()
{
System.Console.WriteLine(“Hello, World”);
}
}
mmouf@2017
Structure of C# program (cont.)
‱ The entry point to a C# application is the Main() method, which must
be: contained in a class, begin with capital M, and public static.
‱ public: modifier tells us that the method is accessible by everyone.
‱ static: means that the method can be called without creating an
instance of the class.
‱ The .Net Framework is made up of many namespaces, the most
important of which is called System; it contains the classes that most
application uses for interacting with the operating System.
‱ We can refer to objects in namespace by:
1.prefixing them explicitly with the identifier of namespace
System.Console.WriteLine(“Hello, World”);
2.specifing a namespace by placing a using directive at the beginning
of the application before the first class is defined
using System
mmouf@2017
Basic Input / Output operation
‱ Output:
Use the following 2 methods for output:
Console.Write()
Console.WriteLine()
The difference is that WriteLine() append a new line/carriage return to
the end of the output.
To print a constant value:
Console.WriteLine(99);
Console.WriteLine(“Hello, World”);
To print a variable value:
int x = 99;
Console.WriteLine(x);
To print a combination from variable and constant value:
Console.WriteLine(“The Sum of {0} and {1} is {2}”, x, x, x+x);
mmouf@2017
Basic Input / Output operation
‱ Input:
Use the following 2 methods for iutput:
Console.Read(), which read single character and return its ASCII
Console.ReadLine(), which read a string
string input = Console.ReadLine();
To read an integer, use the Parse:
string s = Console.ReadLine();
int n = int.Parse(s);
mmouf@2017

Weitere Àhnliche Inhalte

Was ist angesagt?

03 oo with-c-sharp
03 oo with-c-sharp03 oo with-c-sharp
03 oo with-c-sharp
Naved khan
 

Was ist angesagt? (20)

Intake 38 4
Intake 38 4Intake 38 4
Intake 38 4
 
Intake 37 ef2
Intake 37 ef2Intake 37 ef2
Intake 37 ef2
 
Method overloading and constructor overloading in java
Method overloading and constructor overloading in javaMethod overloading and constructor overloading in java
Method overloading and constructor overloading in java
 
Differences between method overloading and method overriding
Differences between method overloading and method overridingDifferences between method overloading and method overriding
Differences between method overloading and method overriding
 
Intake 37 linq2
Intake 37 linq2Intake 37 linq2
Intake 37 linq2
 
Intake 37 ef1
Intake 37 ef1Intake 37 ef1
Intake 37 ef1
 
03 oo with-c-sharp
03 oo with-c-sharp03 oo with-c-sharp
03 oo with-c-sharp
 
OOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NETOOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NET
 
2CPP08 - Overloading and Overriding
2CPP08 - Overloading and Overriding2CPP08 - Overloading and Overriding
2CPP08 - Overloading and Overriding
 
Intake 37 linq1
Intake 37 linq1Intake 37 linq1
Intake 37 linq1
 
Constructors destructors
Constructors destructorsConstructors destructors
Constructors destructors
 
Chapter 5:Understanding Variable Scope and Class Construction
Chapter 5:Understanding Variable Scope and Class ConstructionChapter 5:Understanding Variable Scope and Class Construction
Chapter 5:Understanding Variable Scope and Class Construction
 
Classes, Objects and Method - Object Oriented Programming with Java
Classes, Objects and Method - Object Oriented Programming with JavaClasses, Objects and Method - Object Oriented Programming with Java
Classes, Objects and Method - Object Oriented Programming with Java
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Method overloading
Method overloadingMethod overloading
Method overloading
 
Inheritance
InheritanceInheritance
Inheritance
 
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
 
11. java methods
11. java methods11. java methods
11. java methods
 
Ű§Ù„ŰšŰ±Ù…ŰŹŰ© Ű§Ù„Ù‡ŰŻÙÙŠŰ© ŰšÙ„ŰșŰ© ŰŹŰ§ÙŰ§ - Ù…Ű”ÙÙˆÙŰ© Ű§Ù„ÙƒŰ§ŰŠÙ†Ű§ŰȘ
Ű§Ù„ŰšŰ±Ù…ŰŹŰ© Ű§Ù„Ù‡ŰŻÙÙŠŰ©  ŰšÙ„ŰșŰ© ŰŹŰ§ÙŰ§ - Ù…Ű”ÙÙˆÙŰ© Ű§Ù„ÙƒŰ§ŰŠÙ†Ű§ŰȘŰ§Ù„ŰšŰ±Ù…ŰŹŰ© Ű§Ù„Ù‡ŰŻÙÙŠŰ©  ŰšÙ„ŰșŰ© ŰŹŰ§ÙŰ§ - Ù…Ű”ÙÙˆÙŰ© Ű§Ù„ÙƒŰ§ŰŠÙ†Ű§ŰȘ
Ű§Ù„ŰšŰ±Ù…ŰŹŰ© Ű§Ù„Ù‡ŰŻÙÙŠŰ© ŰšÙ„ŰșŰ© ŰŹŰ§ÙŰ§ - Ù…Ű”ÙÙˆÙŰ© Ű§Ù„ÙƒŰ§ŰŠÙ†Ű§ŰȘ
 
vb.net Constructor and destructor
vb.net Constructor and destructorvb.net Constructor and destructor
vb.net Constructor and destructor
 

Andere mochten auch

Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
Intermediate Level Apprenticeship in Customer Service in the Business Skills ...Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
Anthony Fowler
 
Convivencia1
Convivencia1Convivencia1
Convivencia1
guestbaaadd
 

Andere mochten auch (14)

Intake 37 linq3
Intake 37 linq3Intake 37 linq3
Intake 37 linq3
 
PRDC12 advanced design patterns
PRDC12 advanced design patternsPRDC12 advanced design patterns
PRDC12 advanced design patterns
 
Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
Intermediate Level Apprenticeship in Customer Service in the Business Skills ...Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
Intermediate Level Apprenticeship in Customer Service in the Business Skills ...
 
Ma,cv,fn 2017-febrero-cn-es-w
Ma,cv,fn 2017-febrero-cn-es-wMa,cv,fn 2017-febrero-cn-es-w
Ma,cv,fn 2017-febrero-cn-es-w
 
Convivencia1
Convivencia1Convivencia1
Convivencia1
 
Tidal Audio Middle East Impressions Book Middle East and Africa
Tidal Audio Middle East Impressions Book Middle East and AfricaTidal Audio Middle East Impressions Book Middle East and Africa
Tidal Audio Middle East Impressions Book Middle East and Africa
 
Of Forgiveness and Gratitude
Of Forgiveness and GratitudeOf Forgiveness and Gratitude
Of Forgiveness and Gratitude
 
Film Poster and Review & Target Audience
Film Poster and Review & Target AudienceFilm Poster and Review & Target Audience
Film Poster and Review & Target Audience
 
Intake 37 8
Intake 37 8Intake 37 8
Intake 37 8
 
CLASE 20
CLASE 20CLASE 20
CLASE 20
 
1.taldea
1.taldea1.taldea
1.taldea
 
ĐĄŃ†Đ”ĐœĐ°Ń€Ń–Đč сĐČята ĐŽĐŸ ĐŽĐœŃ ĐœĐ°Ń€ĐŸĐŽĐ¶Đ”ĐœĐœŃ Đą.Г. КДĐČŃ‡Đ”ĐœĐșĐ° «й.Г. КДĐČŃ‡Đ”ĐœĐșĐŸ – ĐČДлОĐșĐžĐč ŃĐžĐœ у...
ĐĄŃ†Đ”ĐœĐ°Ń€Ń–Đč сĐČята ĐŽĐŸ ĐŽĐœŃ ĐœĐ°Ń€ĐŸĐŽĐ¶Đ”ĐœĐœŃ Đą.Г. КДĐČŃ‡Đ”ĐœĐșĐ° «й.Г. КДĐČŃ‡Đ”ĐœĐșĐŸ – ĐČДлОĐșĐžĐč ŃĐžĐœ у...ĐĄŃ†Đ”ĐœĐ°Ń€Ń–Đč сĐČята ĐŽĐŸ ĐŽĐœŃ ĐœĐ°Ń€ĐŸĐŽĐ¶Đ”ĐœĐœŃ Đą.Г. КДĐČŃ‡Đ”ĐœĐșĐ° «й.Г. КДĐČŃ‡Đ”ĐœĐșĐŸ – ĐČДлОĐșĐžĐč ŃĐžĐœ у...
ĐĄŃ†Đ”ĐœĐ°Ń€Ń–Đč сĐČята ĐŽĐŸ ĐŽĐœŃ ĐœĐ°Ń€ĐŸĐŽĐ¶Đ”ĐœĐœŃ Đą.Г. КДĐČŃ‡Đ”ĐœĐșĐ° «й.Г. КДĐČŃ‡Đ”ĐœĐșĐŸ – ĐČДлОĐșĐžĐč ŃĐžĐœ у...
 
Schizotypal personality disorder and its psychodynamic perspective
Schizotypal personality disorder and its psychodynamic perspectiveSchizotypal personality disorder and its psychodynamic perspective
Schizotypal personality disorder and its psychodynamic perspective
 
Operations Strategy for Industry: A Case Study
Operations Strategy for Industry: A Case StudyOperations Strategy for Industry: A Case Study
Operations Strategy for Industry: A Case Study
 

Ähnlich wie Intake 37 1

Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
Gregory Renard
 
Crack mcts.com
Crack mcts.comCrack mcts.com
Crack mcts.com
Naveen Sihag
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
Ali Taki
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions
9292929292
 

Ähnlich wie Intake 37 1 (20)

.Net Migration
.Net Migration .Net Migration
.Net Migration
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - .NET Standard -- Karel Zikmund
 
Overview of .Net Framework
Overview of .Net FrameworkOverview of .Net Framework
Overview of .Net Framework
 
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
 
.Net the begining
.Net the begining.Net the begining
.Net the begining
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
Asp.net new
Asp.net newAsp.net new
Asp.net new
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentals
 
Crack mcts.com
Crack mcts.comCrack mcts.com
Crack mcts.com
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
Net framework
Net frameworkNet framework
Net framework
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
A simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB TechA simplest way to reconstruct .Net Framework - CRB Tech
A simplest way to reconstruct .Net Framework - CRB Tech
 
A simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-frameworkA simplest-way-to-reconstruct-.net-framework
A simplest-way-to-reconstruct-.net-framework
 
Dot net interview_questions
Dot net interview_questionsDot net interview_questions
Dot net interview_questions
 

Mehr von Mahmoud Ouf (18)

Relation between classes in arabic
Relation between classes in arabicRelation between classes in arabic
Relation between classes in arabic
 
Intake 38 data access 5
Intake 38 data access 5Intake 38 data access 5
Intake 38 data access 5
 
Intake 38 data access 4
Intake 38 data access 4Intake 38 data access 4
Intake 38 data access 4
 
Intake 38 data access 3
Intake 38 data access 3Intake 38 data access 3
Intake 38 data access 3
 
Intake 38 data access 1
Intake 38 data access 1Intake 38 data access 1
Intake 38 data access 1
 
Intake 38 11
Intake 38 11Intake 38 11
Intake 38 11
 
Intake 38 10
Intake 38 10Intake 38 10
Intake 38 10
 
Intake 38 9
Intake 38 9Intake 38 9
Intake 38 9
 
Intake 38 8
Intake 38 8Intake 38 8
Intake 38 8
 
Intake 38 7
Intake 38 7Intake 38 7
Intake 38 7
 
Intake 38 6
Intake 38 6Intake 38 6
Intake 38 6
 
Intake 38 5 1
Intake 38 5 1Intake 38 5 1
Intake 38 5 1
 
Intake 38 5
Intake 38 5Intake 38 5
Intake 38 5
 
Intake 37 DM
Intake 37 DMIntake 37 DM
Intake 37 DM
 
Intake 37 12
Intake 37 12Intake 37 12
Intake 37 12
 
Intake 37 11
Intake 37 11Intake 37 11
Intake 37 11
 
Intake 37 10
Intake 37 10Intake 37 10
Intake 37 10
 
Intake 37 9
Intake 37 9Intake 37 9
Intake 37 9
 

KĂŒrzlich hochgeladen

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
Christopher Logan Kennedy
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

KĂŒrzlich hochgeladen (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Intake 37 1

  • 1. Visual C# .Net using framework 4.5 Eng. Mahmoud Ouf Lecture 01 mmouf@2017
  • 2. Introduction to .Net Framework ‱ The development of .Net Framework started the late 1990. ‱ First version was released early 2002. ‱ Through the 15 years it passes 8 upgrades ‱ Some of these upgrades was released with new version of Visual Studio.Net. mmouf@2017
  • 3. Introduction to .Net Framework Framework version Release date Development tool 1.0 13/02/2002 Visual Studio .Net 2002 1.1 24/04/2003 Visual Studio .Net 2003 2.0 07/11/2005 Visual Studio .Net 2005 3.0 06/11/2006 Visual Studio .Net 2005 3.5 19/11/2007 Visual Studio .Net 2008 4.0 12/04/2010 Visual Studio .Net 2010 4.5 15/08/2012 Visual Studio .Net 2012 4.6 20/07/2015 Visual Studio .Net 2015 mmouf@2017
  • 4. Overview of .Net Framework Common Language Runtime (CLR) Framework Class Library (FCL) WinForm ASP.NET ADO.NET 2.0 WPF WCF WF InfoCard LINQ Entity Framework Parallel LINQ Task Parallel Library .Net APIs for store/uwp Task based Async model 3.0 3.5 4.0 4.5 mmouf@2017
  • 5. Common Language Runtime (CLR) Class Loader MSIL to native compiler Code manager Garbage collector Security Engine Debug Engine Type Checker Exception Manager Thread support COM Marshaler Base Class Library (BCL) support mmouf@2017
  • 6. From source code to executable C# Code VB.Net Code Managed C++ Code C# Compiler VB.Net Compiler Managed C++ Compiler MSIL, CIL (IL) PE file (dll, exe) mmouf@2017
  • 7. .Net Framework 1.1 1. Built in support for mobile ASP.Net controls 2. Enables Code Access Security in ASP.Net application 3. Built-in support for ODBC and Oracle Database 4. .Net Compact Framework 5. Support Internet Protocol version 6 (IPv6) mmouf@2017
  • 8. .Net Framework 2.0 1. Full 64-bit support 2. Numerous API changes 3. Microsoft SQL Server integration 4. Additional and improved ASP.Net web controls 5. New personalization features for ASP.Net 6. Partial classes 7. Nullable types 8. Anonymous methods mmouf@2017
  • 9. .Net Framework 3.0 1. Windows Presentation Foundation (WPF) 2. Windows Communication Foundation (WCF) 3. Windows Workflow Foundation (WF) 4. Windows CardSpace mmouf@2017
  • 10. .Net Framework 4.0 1. Parallel Extension to improve support of parallel programming 2. New Visual basic and C# features 3. Include new types 4. Introduced Common Language Runtime (CLR) 4.0 mmouf@2017
  • 11. .Net Framework 4.5 1. .Net for Metro Style apps 2. Managed Extensibility Framework (MEF) 3. Core Features 4. ASP .Net 5. Networking mmouf@2017
  • 12. .Net Framework 4.6 1. Just In Time (jit) compiler for 64 bit system 2. WPF and Windows Forms both have been updated for high DPI scenarios 3. Support for TLS 1.1 and TLS 1.2 has been added to WCF ASP .Net 4. The cryptographic API in .NET Framework 4.6 uses the latest version of Windows CNG cryptography API. mmouf@2017
  • 13. Structure of C# program ‱ In C#, an application is a collection of one or more classes. ‱ The classes for a C# application can be written in more than one file and multiple classes can be put in one file. One class could be written in multiple files (partial class). class HelloWorld { public static void Main() { System.Console.WriteLine(“Hello, World”); } } mmouf@2017
  • 14. Structure of C# program (cont.) ‱ The entry point to a C# application is the Main() method, which must be: contained in a class, begin with capital M, and public static. ‱ public: modifier tells us that the method is accessible by everyone. ‱ static: means that the method can be called without creating an instance of the class. ‱ The .Net Framework is made up of many namespaces, the most important of which is called System; it contains the classes that most application uses for interacting with the operating System. ‱ We can refer to objects in namespace by: 1.prefixing them explicitly with the identifier of namespace System.Console.WriteLine(“Hello, World”); 2.specifing a namespace by placing a using directive at the beginning of the application before the first class is defined using System mmouf@2017
  • 15. Basic Input / Output operation ‱ Output: Use the following 2 methods for output: Console.Write() Console.WriteLine() The difference is that WriteLine() append a new line/carriage return to the end of the output. To print a constant value: Console.WriteLine(99); Console.WriteLine(“Hello, World”); To print a variable value: int x = 99; Console.WriteLine(x); To print a combination from variable and constant value: Console.WriteLine(“The Sum of {0} and {1} is {2}”, x, x, x+x); mmouf@2017
  • 16. Basic Input / Output operation ‱ Input: Use the following 2 methods for iutput: Console.Read(), which read single character and return its ASCII Console.ReadLine(), which read a string string input = Console.ReadLine(); To read an integer, use the Parse: string s = Console.ReadLine(); int n = int.Parse(s); mmouf@2017