SlideShare a Scribd company logo
Visual Programming
C#

1
SUN
MICROSOFT

2
Microsoft and Sun's Confrontation









It's new
it's powerful
it solves lots of problems
it is threatening to a vast community of Java
worshippers, and best (or worst) of all it's from
Microsoft. You guessed it right;I am talking
about .NET
Around 1995, Java was generating the same
Strength as is generated by .NET today
!. Sun's Java introduced a revolutionary approach
of software development
Java provided the programmer's with a unique tool
that solved their ages long problem of platform
independence

3
Microsoft and Sun's Confrontation






Sun addressed industry's needs by coming up with
tools like JSP, Servlets, EJB, JMS, JNDI, JNI etc.
Sun stuffed these excellent tools under one
umbrella - the Java2 Enterprise Edition (J2EE).
Microsoft was trying to catch up
All this time when Sun was winning our admiration;
Microsoft was trying their level best to match up to
Sun's tools. But Sun was un-catchable
Microsoft answer was Microsoft's Windows DNA
(Distributed interNet Applications
Architecture ) programming model
4
Microsoft and Sun's Confrontation




With the world depending more and more on
the Internet - and Sun's tools becoming the
foremost media for the web applications
So Microsoft put their best men at work and
started calling the project as Next
Generation Windows Services (NGWS).

5
What is .NET?




Microsoft defines .NET as “a set of Microsoft
software technologies for connecting
information, people, systems, and devices“
However, Microsoft .NET is not just another
programming language
 It’s




a complete new business initiative

Mission statement: Access to Information
anywhere, anytime
Everything evolves around the Internet
6
The .NET Framework objectives of The .NET
Framework











To provide a consistent object-oriented programming
environment whether object code is stored and executed
locally, executed locally but Internet-distributed, or executed
remotely.
To provide a code-execution environment that minimizes
software deployment and versioning conflicts.
To provide a code-execution environment that guarantees
safe execution of code, including code created by an
unknown or semi-trusted third party.
To provide a code-execution environment that eliminates
the performance problems of scripted or interpreted
environments.
To make the developer experience consistent across widely
varying types of applications, such as Windows-based
applications and Web-based applications.
To build all communication on industry standards to ensure
that code based on the .NET Framework can integrate with 7
any other code.
Information Anywhere, Anytime

■ Server
machines that
provide
information or
services
(database
server, content
provider,…)
8
Information Anywhere, Anytime

■ Sophisticated
computing
devices that
communicate
with PCs to
allow access to
information
9
Information Anywhere, Anytime

■ A standardized
protocol for the
internet to allow
different
programs and
devices to talk to
each other
10
Information Anywhere, Anytime

■ A set of
developer tools
that allows you
to write server
and client
programs as
well as XML Web
Services
11
Personal Opinion
New programming languages
new virtual machine
simply a great IDE

12
Conventional Developing
Source
Code

Source
Code

Binary
code

In the past,
compiled code
only runs on the
computer it was
compiled for

Binary code

Operating
System

Operating
System
13
Virtual Machine Concept
Source
Code

Intermediate
code

Intermediate
code

Virtual Machine

Virtual Machine

Operating
System

Operating
System

Virtual Machine
acting as the
adaptor to the
physical
computer
Compiled code
will run on any
computer as
long as this
virtual machine
is installed
14
.NET Framework
Microsoft
Intermediate
Language (MSIL)

.NET Framework / Common
Language Runtime (CLR)

Operating System

Virtual Machine is
called “Common
Language Runtime”
(CLR) or sometimes
simply .NET
Framework
Compiled code also
called “Microsoft
Intermediate
Language” (MSIL)
15
.NET Framework
C#

VB.NET

MSIL

J#

Many .NET
languages
C#, VB.NET
J#
C++ .NET
Cobol, Perl
...

16
.Net Languages






Unlike Java’s VM, different languages can
be used to compile into Intermediate
Language.
C# - more like Java than C++
VB.NET – Visual Basic’s response
J#, Cobol, Fortran, Scheme, Perl, ...

17
Installing the .NET Framework





.NET Framework installs only on Windows
98 and above
It’s a 20 MB file named “dotnetfx.exe”
Can also be found
 http://windowsupdate.microsoft.com



Comes pre-installed starting with Windows
Server 2003
18
.NET Framework Class Library


There are literally thousands of extremely
useful classes that cover very common
tasks:
 File

operations, networking, cryptography
 Database access, Windows-related tasks


One major key to .NET programming is
actually to know the classes (instead of
wasting time writing them from scratch)
19
Namespaces


Every class belongs to a namespace
 e.x.,

FileInfo belongs to the System.IO
namespace
 You can refer to it using System.IO.FileInfo or
use the “using” or “imports” keyword to “import”
entire namespaces
 This allows different classes with the same
name to co-exist

20
What is "Common Type System"
(CTS)








provide language interoperability
language sharing the same data types
int should mean the same in VB, VC++, C#
and all other
CTS, much like Java, defines every data
type as a Class
Every .NET compliant language must stick
to this definition
21
Popular Project Types








Console applications.
Scripted or hosted applications.
Windows GUI applications (Windows Forms).
ASP.NET applications.
XML Web services.
Windows services.
Windows Forms Application




ASP.NET Applications




.NET programs that run under the Microsoft Windows platform
(previously known as “Win32 Applications”)
An entire website that is driven by Microsoft .NET

Smart Clients


Sophisticated computing devices that communicate with PCs to
allow access to information


PDAs, Laptops, Terminals, Cellphones

22
.NET Development
VB

C++

C#

J#

…

Common Language Specification
ASP.NET
Web Forms Web Services
Mobile Internet Toolkit

Windows
Forms

ADO.NET and XML
Base Class Library
Common Language Runtime
Operating System
23
The .NET Framework: Common Language
Specification
 Basic themes of .NET is unification and
interoperability between various
programming languages
 To

achieve this there must be some rules
followed by all the languages



CLS is the collection of the rules and
constraints that every language (that seeks
to achieve .NET compatibility) must follow

24
The .NET Framework: Common Language
Specification



Microsoft have defined three level of CLS
compatibility/compliance.
COMPLIANT PRODUCER




CONSUMER




The language in this category can use classes produced in any
other language

EXTENDER




The component developed in this type of language can be used by
any other language

Languages in this category can not just use the classes as in
CONSUMER category; but can also extend classes using
inheritance

Microsoft is providing




Visual Basic®, C++, C#, J#, JScript®

Industry and academia


APL, COBOL, Eiffel, Fortran, Haskell, ML, Perl, Python, RPG, Scheme,
Smalltalk, …
25
Common Language Infrastructure
The following organizations have participated
and their contributions are gratefully
acknowledged:
Fujitsu Software, Hewlett-Packard, Intel
Corporation, International Business Machines, ISE,
Microsoft Corporation, Monash University,
Netscape, OpenWave, Plum Hall, Sun
Microsystems

26
.NET Development
VB

C++

C#

J#

…

Common Language Specification
ASP.NET
Web Forms Web Services
Mobile Internet Toolkit

Windows
Forms

ADO.NET and XML
Base Class Library
Common Language Runtime
Operating System
27
Common Language Runtime: Execution
model
Source
code

C#

C++

Compiler

Managed
code

VB

Compiler

Compiler

Assembly
IL Code

Assembly
IL Code

Assembly
IL Code

Unmanaged
Component

Common Language Runtime
JIT Compiler

Native Code

Operating System Services
28
What is "Microsoft Intermediate
Language" (MSIL)








A .NET programming language (C#,
VB.NET, J# etc.) does not compile into
executable code
compiles into an intermediate code called
Microsoft Intermediate Language (MSIL).
The MSIL code is then send to the CLR
(Common Language Runtime) that converts
the code to machine language which is then
run on the host machine
MSIL is similar to Java Byte code

29
Common Language Runtime









Every .NET Framework application relies on the
CLR
Every .NET Framework assembly contains a
manifest:
 Class/Method Meta-Data
 Versioning Information
The common language runtime manages memory,
thread execution, code execution, code safety
verification, compilation, and other system services
The runtime is designed to enhance performance
The runtime also accelerates developer
productivity
30
Inside a .NET Framework Application




During Execution, MSIL is JIT Compiled
Method-by-Method, and stored in the Global
Assembly Cache (machine-wide code cache
) on the Hard Drive
The GAC knows the version information!
 Copy

a new version, execute – and both
versions are still available in the cache.

App1.exe
Ref: Widget.dll, ver 1.2.1.7
App2.exe
Ref: Widget.dll, ver 1.3.0.0

Widget.dll
Ver 1.2.1.7

GAC

Widget.dll
Ver 1.3.0.0
31
.NET Development
VB

C++

C#

J#

…

Common Language Specification
ASP.NET
Web Forms Web Services
Mobile Internet Toolkit

Windows
Forms

ADO.NET and XML
Base Class Library
Common Language Runtime
Operating System
32
Start Visual Studio.Net 2005
Click on New Project Button

33
. Starting Projects



Creating a New Project
In the Visual Studio.NET environment, select File |
New | Project from the menu.

34
•
•
•
•
•
•

In left window, select “Visual Basic Projects”.
In right window, select “Console Application”
Name it What u want (Note: No Spaces!)
Click “Browse” button to select your Location.
Note location where project will be saved.
Click “OK” button to create the project.

35
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine ("This is first Program");
Console.ReadLine();
}
}
}

36
Console Output

Note the console window.
37

Press enter to exit that window.

More Related Content

What's hot

ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
Threads And Synchronization in C#
Threads And Synchronization in C#Threads And Synchronization in C#
Threads And Synchronization in C#
Rizwan Ali
 
Object model
Object modelObject model
Object model
James Wong
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training
Moutasm Tamimi
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
Arun Prasad
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET Framework
Roshith S Pai
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
MUKALU STEVEN
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
Bagzzz
 
Java swing
Java swingJava swing
Java swing
Apurbo Datta
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
dot net technology
dot net technologydot net technology
dot net technology
Imran Khan
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
Shubham Dwivedi
 
The Object Model
The Object Model  The Object Model
The Object Model
yndaravind
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Tushar B Kute
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
Riccardo Cardin
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
prabhu rajendran
 

What's hot (20)

ADO .Net
ADO .Net ADO .Net
ADO .Net
 
.Net Assemblies
.Net Assemblies.Net Assemblies
.Net Assemblies
 
Threads And Synchronization in C#
Threads And Synchronization in C#Threads And Synchronization in C#
Threads And Synchronization in C#
 
Object model
Object modelObject model
Object model
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Components of .NET Framework
Components of .NET FrameworkComponents of .NET Framework
Components of .NET Framework
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Java swing
Java swingJava swing
Java swing
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
dot net technology
dot net technologydot net technology
dot net technology
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
 
The Object Model
The Object Model  The Object Model
The Object Model
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 

Viewers also liked

Visula C# Programming Lecture 3
Visula C# Programming Lecture 3Visula C# Programming Lecture 3
Visula C# Programming Lecture 3
Abou Bakr Ashraf
 
Visula C# Programming Lecture 2
Visula C# Programming Lecture 2Visula C# Programming Lecture 2
Visula C# Programming Lecture 2
Abou Bakr Ashraf
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
Shahzad
 
Visula C# Programming Lecture 5
Visula C# Programming Lecture 5Visula C# Programming Lecture 5
Visula C# Programming Lecture 5
Abou Bakr Ashraf
 
Visual studio .net c# study guide
Visual studio .net c# study guideVisual studio .net c# study guide
Visual studio .net c# study guide
root12345
 
Learn C# at ASIT
Learn C# at ASITLearn C# at ASIT
Learn C# at ASIT
ASIT
 
C# Basics Quick Reference Sheet
C# Basics Quick Reference SheetC# Basics Quick Reference Sheet
C# Basics Quick Reference Sheet
FrescatiStory
 
C# quick ref (bruce 2016)
C# quick ref (bruce 2016)C# quick ref (bruce 2016)
C# quick ref (bruce 2016)
Bruce Hantover
 
Dr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot netDr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot net
Dr-archana-dhawan-bajaj
 
C# Cheat Sheet
C# Cheat SheetC# Cheat Sheet
C# Cheat Sheet
GlowTouch
 
DATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.netDATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.net
Sireesh K
 
Visual programming lab
Visual programming labVisual programming lab
Visual programming labSoumya Behera
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
Ralph Weber
 

Viewers also liked (17)

Visula C# Programming Lecture 3
Visula C# Programming Lecture 3Visula C# Programming Lecture 3
Visula C# Programming Lecture 3
 
Visula C# Programming Lecture 2
Visula C# Programming Lecture 2Visula C# Programming Lecture 2
Visula C# Programming Lecture 2
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
 
Visula C# Programming Lecture 5
Visula C# Programming Lecture 5Visula C# Programming Lecture 5
Visula C# Programming Lecture 5
 
Visual studio .net c# study guide
Visual studio .net c# study guideVisual studio .net c# study guide
Visual studio .net c# study guide
 
C# for beginners
C# for beginnersC# for beginners
C# for beginners
 
Learn C# at ASIT
Learn C# at ASITLearn C# at ASIT
Learn C# at ASIT
 
C# Basics Quick Reference Sheet
C# Basics Quick Reference SheetC# Basics Quick Reference Sheet
C# Basics Quick Reference Sheet
 
C# quick ref (bruce 2016)
C# quick ref (bruce 2016)C# quick ref (bruce 2016)
C# quick ref (bruce 2016)
 
Dr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot netDr archana dhawan bajaj - c# dot net
Dr archana dhawan bajaj - c# dot net
 
Visual programming
Visual programmingVisual programming
Visual programming
 
C# Cheat Sheet
C# Cheat SheetC# Cheat Sheet
C# Cheat Sheet
 
DATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.netDATATYPE IN C# CSHARP.net
DATATYPE IN C# CSHARP.net
 
Visual programming lab
Visual programming labVisual programming lab
Visual programming lab
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
 
C# basics
C# basicsC# basics
C# basics
 

Similar to Visula C# Programming Lecture 1

Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
Ekam Baram
 
.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions
QUONTRASOLUTIONS
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
SynapseindiaComplaints
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
Vishwa Mohan
 
Microsoft.net architecturte
Microsoft.net architecturteMicrosoft.net architecturte
Microsoft.net architecturteIblesoft
 
Net framework
Net frameworkNet framework
Net frameworkjhsri
 
Asp net
Asp netAsp net
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
Rakesh Joshi
 
jhkghj
jhkghjjhkghj
jhkghjAdmin
 
test2PPT
test2PPTtest2PPT
test2PPTAdmin
 
Asp net
Asp netAsp net
.Net Overview
.Net Overview.Net Overview
.Net Overview
Pankaj Rattan
 
ASP.Net Technologies Part-1
ASP.Net Technologies Part-1ASP.Net Technologies Part-1
ASP.Net Technologies Part-1
Vasudev Sharma
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
husnara mohammad
 
Presentation1
Presentation1Presentation1
Presentation1kpkcsc
 

Similar to Visula C# Programming Lecture 1 (20)

Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
As Pdotnet
As PdotnetAs Pdotnet
As Pdotnet
 
.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions.Net introduction by Quontra Solutions
.Net introduction by Quontra Solutions
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
 
Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
Microsoft.net architecturte
Microsoft.net architecturteMicrosoft.net architecturte
Microsoft.net architecturte
 
Net framework
Net frameworkNet framework
Net framework
 
Asp net
Asp netAsp net
Asp net
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
Dot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part iDot net-interview-questions-and-answers part i
Dot net-interview-questions-and-answers part i
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 
Mca 504 dotnet_unit1
Mca 504 dotnet_unit1Mca 504 dotnet_unit1
Mca 504 dotnet_unit1
 
jhkghj
jhkghjjhkghj
jhkghj
 
test2PPT
test2PPTtest2PPT
test2PPT
 
Asp net
Asp netAsp net
Asp net
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
ASP.Net Technologies Part-1
ASP.Net Technologies Part-1ASP.Net Technologies Part-1
ASP.Net Technologies Part-1
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
 
Presentation1
Presentation1Presentation1
Presentation1
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Visula C# Programming Lecture 1

  • 3. Microsoft and Sun's Confrontation        It's new it's powerful it solves lots of problems it is threatening to a vast community of Java worshippers, and best (or worst) of all it's from Microsoft. You guessed it right;I am talking about .NET Around 1995, Java was generating the same Strength as is generated by .NET today !. Sun's Java introduced a revolutionary approach of software development Java provided the programmer's with a unique tool that solved their ages long problem of platform independence 3
  • 4. Microsoft and Sun's Confrontation    Sun addressed industry's needs by coming up with tools like JSP, Servlets, EJB, JMS, JNDI, JNI etc. Sun stuffed these excellent tools under one umbrella - the Java2 Enterprise Edition (J2EE). Microsoft was trying to catch up All this time when Sun was winning our admiration; Microsoft was trying their level best to match up to Sun's tools. But Sun was un-catchable Microsoft answer was Microsoft's Windows DNA (Distributed interNet Applications Architecture ) programming model 4
  • 5. Microsoft and Sun's Confrontation   With the world depending more and more on the Internet - and Sun's tools becoming the foremost media for the web applications So Microsoft put their best men at work and started calling the project as Next Generation Windows Services (NGWS). 5
  • 6. What is .NET?   Microsoft defines .NET as “a set of Microsoft software technologies for connecting information, people, systems, and devices“ However, Microsoft .NET is not just another programming language  It’s   a complete new business initiative Mission statement: Access to Information anywhere, anytime Everything evolves around the Internet 6
  • 7. The .NET Framework objectives of The .NET Framework       To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. To provide a code-execution environment that minimizes software deployment and versioning conflicts. To provide a code-execution environment that guarantees safe execution of code, including code created by an unknown or semi-trusted third party. To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications. To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with 7 any other code.
  • 8. Information Anywhere, Anytime ■ Server machines that provide information or services (database server, content provider,…) 8
  • 9. Information Anywhere, Anytime ■ Sophisticated computing devices that communicate with PCs to allow access to information 9
  • 10. Information Anywhere, Anytime ■ A standardized protocol for the internet to allow different programs and devices to talk to each other 10
  • 11. Information Anywhere, Anytime ■ A set of developer tools that allows you to write server and client programs as well as XML Web Services 11
  • 12. Personal Opinion New programming languages new virtual machine simply a great IDE 12
  • 13. Conventional Developing Source Code Source Code Binary code In the past, compiled code only runs on the computer it was compiled for Binary code Operating System Operating System 13
  • 14. Virtual Machine Concept Source Code Intermediate code Intermediate code Virtual Machine Virtual Machine Operating System Operating System Virtual Machine acting as the adaptor to the physical computer Compiled code will run on any computer as long as this virtual machine is installed 14
  • 15. .NET Framework Microsoft Intermediate Language (MSIL) .NET Framework / Common Language Runtime (CLR) Operating System Virtual Machine is called “Common Language Runtime” (CLR) or sometimes simply .NET Framework Compiled code also called “Microsoft Intermediate Language” (MSIL) 15
  • 16. .NET Framework C# VB.NET MSIL J# Many .NET languages C#, VB.NET J# C++ .NET Cobol, Perl ... 16
  • 17. .Net Languages     Unlike Java’s VM, different languages can be used to compile into Intermediate Language. C# - more like Java than C++ VB.NET – Visual Basic’s response J#, Cobol, Fortran, Scheme, Perl, ... 17
  • 18. Installing the .NET Framework    .NET Framework installs only on Windows 98 and above It’s a 20 MB file named “dotnetfx.exe” Can also be found  http://windowsupdate.microsoft.com  Comes pre-installed starting with Windows Server 2003 18
  • 19. .NET Framework Class Library  There are literally thousands of extremely useful classes that cover very common tasks:  File operations, networking, cryptography  Database access, Windows-related tasks  One major key to .NET programming is actually to know the classes (instead of wasting time writing them from scratch) 19
  • 20. Namespaces  Every class belongs to a namespace  e.x., FileInfo belongs to the System.IO namespace  You can refer to it using System.IO.FileInfo or use the “using” or “imports” keyword to “import” entire namespaces  This allows different classes with the same name to co-exist 20
  • 21. What is "Common Type System" (CTS)      provide language interoperability language sharing the same data types int should mean the same in VB, VC++, C# and all other CTS, much like Java, defines every data type as a Class Every .NET compliant language must stick to this definition 21
  • 22. Popular Project Types        Console applications. Scripted or hosted applications. Windows GUI applications (Windows Forms). ASP.NET applications. XML Web services. Windows services. Windows Forms Application   ASP.NET Applications   .NET programs that run under the Microsoft Windows platform (previously known as “Win32 Applications”) An entire website that is driven by Microsoft .NET Smart Clients  Sophisticated computing devices that communicate with PCs to allow access to information  PDAs, Laptops, Terminals, Cellphones 22
  • 23. .NET Development VB C++ C# J# … Common Language Specification ASP.NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO.NET and XML Base Class Library Common Language Runtime Operating System 23
  • 24. The .NET Framework: Common Language Specification  Basic themes of .NET is unification and interoperability between various programming languages  To achieve this there must be some rules followed by all the languages  CLS is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow 24
  • 25. The .NET Framework: Common Language Specification   Microsoft have defined three level of CLS compatibility/compliance. COMPLIANT PRODUCER   CONSUMER   The language in this category can use classes produced in any other language EXTENDER   The component developed in this type of language can be used by any other language Languages in this category can not just use the classes as in CONSUMER category; but can also extend classes using inheritance Microsoft is providing   Visual Basic®, C++, C#, J#, JScript® Industry and academia  APL, COBOL, Eiffel, Fortran, Haskell, ML, Perl, Python, RPG, Scheme, Smalltalk, … 25
  • 26. Common Language Infrastructure The following organizations have participated and their contributions are gratefully acknowledged: Fujitsu Software, Hewlett-Packard, Intel Corporation, International Business Machines, ISE, Microsoft Corporation, Monash University, Netscape, OpenWave, Plum Hall, Sun Microsystems 26
  • 27. .NET Development VB C++ C# J# … Common Language Specification ASP.NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO.NET and XML Base Class Library Common Language Runtime Operating System 27
  • 28. Common Language Runtime: Execution model Source code C# C++ Compiler Managed code VB Compiler Compiler Assembly IL Code Assembly IL Code Assembly IL Code Unmanaged Component Common Language Runtime JIT Compiler Native Code Operating System Services 28
  • 29. What is "Microsoft Intermediate Language" (MSIL)     A .NET programming language (C#, VB.NET, J# etc.) does not compile into executable code compiles into an intermediate code called Microsoft Intermediate Language (MSIL). The MSIL code is then send to the CLR (Common Language Runtime) that converts the code to machine language which is then run on the host machine MSIL is similar to Java Byte code 29
  • 30. Common Language Runtime      Every .NET Framework application relies on the CLR Every .NET Framework assembly contains a manifest:  Class/Method Meta-Data  Versioning Information The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services The runtime is designed to enhance performance The runtime also accelerates developer productivity 30
  • 31. Inside a .NET Framework Application   During Execution, MSIL is JIT Compiled Method-by-Method, and stored in the Global Assembly Cache (machine-wide code cache ) on the Hard Drive The GAC knows the version information!  Copy a new version, execute – and both versions are still available in the cache. App1.exe Ref: Widget.dll, ver 1.2.1.7 App2.exe Ref: Widget.dll, ver 1.3.0.0 Widget.dll Ver 1.2.1.7 GAC Widget.dll Ver 1.3.0.0 31
  • 32. .NET Development VB C++ C# J# … Common Language Specification ASP.NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO.NET and XML Base Class Library Common Language Runtime Operating System 32
  • 33. Start Visual Studio.Net 2005 Click on New Project Button 33
  • 34. . Starting Projects   Creating a New Project In the Visual Studio.NET environment, select File | New | Project from the menu. 34
  • 35. • • • • • • In left window, select “Visual Basic Projects”. In right window, select “Console Application” Name it What u want (Note: No Spaces!) Click “Browse” button to select your Location. Note location where project will be saved. Click “OK” button to create the project. 35
  • 36. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine ("This is first Program"); Console.ReadLine(); } } } 36
  • 37. Console Output Note the console window. 37 Press enter to exit that window.

Editor's Notes

  1. ECMA is a standards body – for example Jscript – or “ECMAScript”
  2. As an aside…the CLR itself is a COM application – can be hosted (along with any .NET Code) by anything that can host COM. CLR does an assembly load, checks with the policy manager, and if granted, loads the class, which will then do JIT…and it’s an iterative process The CLR is going to be providing the GC, Exception Handling, Class Initialization, Security, etc. JIT can still be done at Install Time to noticeably start up faster. -GC can run on the same thread or concurrently – also does memory defrag, also handles finding memory to delete
  3. Dave starts talking about GAC …config files can be set up to force an exe to use a certain version other than that’s in the assembly.
  4. Dave transitions to Barry