Visual C# .Net using
framework 4.5
Eng. Mahmoud Ouf
Lecture 01
mmouf@2018
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@2018
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@2018
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@2018
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@2018
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@2018
.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@2018
.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@2018
.Net Framework 3.0
1. Windows Presentation Foundation (WPF)
2. Windows Communication Foundation (WCF)
3. Windows Workflow Foundation (WF)
4. Windows CardSpace
mmouf@2018
.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@2018
.Net Framework 4.5
1. .Net for Metro Style apps
2. Managed Extensibility Framework (MEF)
3. Core Features
4. ASP .Net
5. Networking
mmouf@2018
.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@2018
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@2018
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@2018
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@2018
Basic Input / Output operation
•Output (Formatting Numerical Data):
String Format Character
C or c Used to format currency
D or d Used to format decimal numbers, it may specify minimum
number of digit
E or e Used for exponential notation
F or f Used for fixed point formatting, it may specify minimum
number of digit
N or n Used for basic numerical formatting (with commas)
X or x Used for hexadecimal formatting
mmouf@2018
Basic Input / Output operation
•Output (Formatting Numerical Data):
Example:
static void Main()
{
Console.WriteLine("The value 99999 in various formats:");
Console.WriteLine("c format: {0:c}", 99999);
Console.WriteLine("d9 format: {0:d9}", 99999);
Console.WriteLine("f3 format: {0:f3}", 99999);
Console.WriteLine("n format: {0:n}", 99999);
Console.WriteLine("E format: {0:E}", 99999);
Console.WriteLine("e format: {0:e}", 99999);
Console.WriteLine("X format: {0:X}", 99999);
Console.WriteLine("x format: {0:x}", 99999);
}
mmouf@2018
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@2018

More Related Content

PDF
Intake 38 12
PDF
Intake 38 2
PDF
Intake 38 4
PDF
Intake 38 6
PDF
Intake 38 3
PDF
Intake 38 data access 5
PDF
Intake 37 1
PDF
Intake 38 data access 3
Intake 38 12
Intake 38 2
Intake 38 4
Intake 38 6
Intake 38 3
Intake 38 data access 5
Intake 37 1
Intake 38 data access 3

What's hot (20)

PDF
Intake 38 5 1
PDF
Intake 38 5
PDF
Intake 37 2
PDF
Intake 37 4
PDF
Intake 37 6
PDF
Intake 37 5
PDF
Intake 38 7
PDF
Maxbox starter19
PPTX
Chapter 2 c#
PDF
GSP 125 Final Exam Guide
PDF
Gsp 125 final exam guide
PDF
GSP 125 Final Exam Guide
PPTX
Introduction to Matlab Scripts
PPT
Csphtp1 06
PDF
Function overloading ppt
PPT
The smartpath information systems c plus plus
PPT
01 c++ Intro.ppt
PDF
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
DOCX
C# Unit 2 notes
PPTX
Presentation 1st
Intake 38 5 1
Intake 38 5
Intake 37 2
Intake 37 4
Intake 37 6
Intake 37 5
Intake 38 7
Maxbox starter19
Chapter 2 c#
GSP 125 Final Exam Guide
Gsp 125 final exam guide
GSP 125 Final Exam Guide
Introduction to Matlab Scripts
Csphtp1 06
Function overloading ppt
The smartpath information systems c plus plus
01 c++ Intro.ppt
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
C# Unit 2 notes
Presentation 1st
Ad

Similar to Intake 38_1 (20)

PDF
.Net Migration
PPT
Introdot Netc Sharp En
DOCX
Srgoc dotnet_new
PDF
1..Net Framework Architecture-(c#)
PPTX
Overview of .Net Framework
PPS
Asp.net new
PPTX
.Net the begining
PDF
Lecture-1&2.pdf Visual Programming C# .net framework
PPT
01 Introduction to programming
PPTX
.Net framework
PDF
Microsoft .NET Platform
PPTX
Net Fundamentals
PPT
PPTX
DOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsf
PPTX
01. introduction to-programming
PPTX
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
PPTX
Dotnet Frameworks Version History
PPTX
Crack mcts.com
PDF
Dot net-interview-questions-and-answers part i
PPTX
Dot net-interview-questions-and-answers part i
.Net Migration
Introdot Netc Sharp En
Srgoc dotnet_new
1..Net Framework Architecture-(c#)
Overview of .Net Framework
Asp.net new
.Net the begining
Lecture-1&2.pdf Visual Programming C# .net framework
01 Introduction to programming
.Net framework
Microsoft .NET Platform
Net Fundamentals
DOT NET Framework.pptxdsfdsfdsfsdfdsfdsfdsf
01. introduction to-programming
.NET MeetUp Prague 2017 - .NET Standard -- Karel Zikmund
Dotnet Frameworks Version History
Crack mcts.com
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
Ad

More from Mahmoud Ouf (18)

PDF
Relation between classes in arabic
PDF
Intake 38 data access 4
PDF
Intake 38 data access 1
PDF
Intake 38 11
PDF
Intake 38 10
PDF
Intake 38 9
PDF
Intake 38 8
PDF
Intake 37 DM
PDF
Intake 37 ef2
PDF
Intake 37 ef1
PDF
Intake 37 linq3
PDF
Intake 37 linq2
PDF
Intake 37 linq1
PDF
Intake 37 12
PDF
Intake 37 11
PDF
Intake 37 10
PDF
Intake 37 9
PDF
Intake 37 8
Relation between classes in arabic
Intake 38 data access 4
Intake 38 data access 1
Intake 38 11
Intake 38 10
Intake 38 9
Intake 38 8
Intake 37 DM
Intake 37 ef2
Intake 37 ef1
Intake 37 linq3
Intake 37 linq2
Intake 37 linq1
Intake 37 12
Intake 37 11
Intake 37 10
Intake 37 9
Intake 37 8

Recently uploaded (20)

PDF
Disorder of Endocrine system (1).pdfyyhyyyy
PDF
The TKT Course. Modules 1, 2, 3.for self study
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
English-bài kiểm tra tiếng anh cơ bản.pdf
PPTX
UNIT_2-__LIPIDS[1].pptx.................
PDF
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
PDF
Comprehensive Lecture on the Appendix.pdf
PPTX
Macbeth play - analysis .pptx english lit
PDF
M.Tech in Aerospace Engineering | BIT Mesra
PDF
Everyday Spelling and Grammar by Kathi Wyldeck
PDF
semiconductor packaging in vlsi design fab
PDF
Civil Department's presentation Your score increases as you pick a category
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
plant tissues class 6-7 mcqs chatgpt.pdf
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
Compact First Student's Book Cambridge Official
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
Disorder of Endocrine system (1).pdfyyhyyyy
The TKT Course. Modules 1, 2, 3.for self study
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
English-bài kiểm tra tiếng anh cơ bản.pdf
UNIT_2-__LIPIDS[1].pptx.................
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
Comprehensive Lecture on the Appendix.pdf
Macbeth play - analysis .pptx english lit
M.Tech in Aerospace Engineering | BIT Mesra
Everyday Spelling and Grammar by Kathi Wyldeck
semiconductor packaging in vlsi design fab
Civil Department's presentation Your score increases as you pick a category
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
2025 High Blood Pressure Guideline Slide Set.pptx
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
plant tissues class 6-7 mcqs chatgpt.pdf
Journal of Dental Science - UDMY (2022).pdf
Compact First Student's Book Cambridge Official
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Race Reva University – Shaping Future Leaders in Artificial Intelligence

Intake 38_1

  • 1. Visual C# .Net using framework 4.5 Eng. Mahmoud Ouf Lecture 01 mmouf@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 9. .Net Framework 3.0 1. Windows Presentation Foundation (WPF) 2. Windows Communication Foundation (WCF) 3. Windows Workflow Foundation (WF) 4. Windows CardSpace mmouf@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 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@2018
  • 16. Basic Input / Output operation •Output (Formatting Numerical Data): String Format Character C or c Used to format currency D or d Used to format decimal numbers, it may specify minimum number of digit E or e Used for exponential notation F or f Used for fixed point formatting, it may specify minimum number of digit N or n Used for basic numerical formatting (with commas) X or x Used for hexadecimal formatting mmouf@2018
  • 17. Basic Input / Output operation •Output (Formatting Numerical Data): Example: static void Main() { Console.WriteLine("The value 99999 in various formats:"); Console.WriteLine("c format: {0:c}", 99999); Console.WriteLine("d9 format: {0:d9}", 99999); Console.WriteLine("f3 format: {0:f3}", 99999); Console.WriteLine("n format: {0:n}", 99999); Console.WriteLine("E format: {0:E}", 99999); Console.WriteLine("e format: {0:e}", 99999); Console.WriteLine("X format: {0:X}", 99999); Console.WriteLine("x format: {0:x}", 99999); } mmouf@2018
  • 18. 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@2018