UNIT I Introduction
UNIT I Introduction
Introduction to C#
• Introducing C#
• writing a C# Program
• Literals
• Data Types
• Operators
• Expressions
• Flow Control
• More About Variables
• Boxing and unboxing
• Debugging and Error Handling.
Microsoft introduces .NET Framework.
.NET
i. NET stands for Network Enabled Technology (Internet).
ii. In .NET, dot (.) refers to Object-Oriented, and NET refers to the
internet.
iii. So, the complete .NET means through Object-Oriented where
user can implement internet-based applications.
What is not .NET?
.NET is not an Operating system.
.NET is not a database
It is not an ERP application.
.NET is not a Testing Tool.
It is not a programming language.
What is COM?
i. COM stands for Component Object Model.
ii. The COM is one of the Microsoft Frameworks.
iii. Using this Framework, user can develop Windows Applications
(Desktop or Standalone Applications for Windows OS) as well
as Web Applications.
iv. In earlier COM, VB is the programming language that is used
to implement Windows applications and ASP is the technology
used to implement web applications.
What are the disadvantages of COM?
There are two major disadvantages of the COM Framework. They are
as follows:
• Incomplete Object-Oriented Programming means it will not
support all the features of OOPs.
• Platform Dependent means COM applications can run on only
Windows OS.
What is .NET?
•.NET is a free and open-source application platform supported by
Microsoft.
• .Net is a new framework for developing Web-Based and Windows
Based Applications within the Microsoft Environment.
• .Net is powerful tool used to build Distributed Computing
Applications.
.NET Application
.NET Framework
Cross Platform:
Whether you are working in C#, F#, or Visual Basic, your code will
run on any compatible operating system. You can build many types of
apps with .NET. Some are Cross-Platform, and some target a specific
set of operating systems and devices.
Libraries:
i. To extend functionality, Microsoft and others maintain a healthy .NET package
ecosystem.
ii. NuGet is a package manager built specifically for .NET that contains over
100,000 packages.
Framework
iii. A framework is a software. Or you can say a framework is a collection of
many small technologies integrated together to develop applications that can be
executed anywhere.
CLR
iv. CLR (Common Language Runtime)
v. CLR is responsible for providing common syntax, automatic
memory management, and common data type.
vi. Also, the responsibility of CLR is generating native code from
MSIL Code.
CLS (Common Language Specification)
• Every programming language has its own syntactical rules &
specification to write their code.
• So , one programming language cannot understand other
programming languages specification.
• CLS has a common specification for all programming
languages.
• Any language compiler should follow this at the time of
compilation & should generate MSIL.
• This CLS is common to all languages of Managed Code
Execution of .Net
CTS(Common Type System)
i. Managed code execution process of .Net supports many
languages.
ii. Its common that every programming language has its own
data types.
iii. So ,one language can’t understand others data type
specification.
iv. CLR contains its own data types which are common to all
the programming languages, this is CTS.
v. CTS is divided into 2 types
Value Type
Reference Type
GC(Garbage Collector)
i. GC is the one who frees up the memory for CLR’s execution
process.
ii. It is responsible for Automatic Memory Management.
MSIL Code
VB.Net VB.NET Native
CLR Execu
Code Compiler Code
te
J# J#
Code Compiler
Operating System