1. Section: BS in Information Technology - 2A
Day: SAT
Time: 9:00-12:00
Instructor: Percival A. Fernandez, MSIT
2.
3. C# HISTORY
• C# is pronounced as "C-Sharp". It is an object-
oriented programming language provided
by Microsoft that runs on .Net Framework.
• It is based on C++ and Java, but it has many
additional extensions used to perform
component oriented programming approach.
• C# has evolved much since their first release in
the year 2002. It was introduced with .NET
Framework 1.0 and the current version of C# is
5.0.
• Anders Hejlsberg is known as the founder of C#
language.
5. WHAT IS C#?
• C# is pronounced "C-Sharp".
• It is an object-oriented programming language created by
Microsoft that runs on the .NET Framework.
• C# has roots from the C family, and the language is close to
other popular languages like C++ and Java.
• The first version was released in year 2002. The latest
version, C# 8, was released in September 2019.
6. WHAT IS C#?
C# is used for:
• Mobile applications
• Desktop applications
• Web applications
• Web services
• Web sites
• Games
• VR
• Database applications
• And much, much more!
7. WHY USE C#?
• It is one of the most popular programming language in the world
• It is easy to learn and simple to use
• It has a huge community support
• C# is an object oriented language which gives a clear structure to
programs and allows code to be reused, lowering development
costs.
• As C# is close to C, C++ and Java, it makes it easy for
programmers to switch to C# or vice versa
8. WHY USE C#?
• C# has many other reasons for being popular and in demand.
Few of the reasons are mentioned below:
• Easy to Start: C# is a high-level language so it is closer to
other popular programming languages like C, C++, and Java
and thus becomes easy to learn for anyone.
• Widely used for developing Desktop and Web Application: C#
is widely used for developing web applications and Desktop
applications. It is one of the most popular languages that is
used in professional desktop. If anyone wants to create
Microsoft apps, C# is their first choice.
9. WHY USE C#?
• Community: The larger the community the better it is as new
tools and software will be developing to make it better. C#
has a large community so the developments are done to make
it exist in the system and not become extinct.
• Game Development: C# is widely used in game development
and will continue to dominate. C# integrates with Microsoft
and thus has a large target audience. The C# features such as
Automatic Garbage Collection, interfaces, object-oriented,
etc. make C# a popular game developing language.
11. C# FEATURES
C# is object oriented programming language. It provides a lot
of features that are given below.
1.Simple
2.Modern programming language
3.Object oriented
4.Type safe
5.Interoperability
6.Scalable and Updateable
7.Component oriented
8.Structured programming language
9.Rich Library
10.Fast speed
13. C# FEATURES
1) Simple
C# is a simple language in the sense that it provides structured
approach (to break the problem into parts), rich set of library
functions, data types etc.
2) Modern Programming Language
C# programming is based upon the current trend and it is very
powerful and simple for building scalable, interoperable and
robust applications.
3) Object Oriented
C# is object oriented programming language. OOPs makes
development and maintenance easier where as in Procedure-
oriented programming language it is not easy to manage if code
14. C# FEATURES
4) Type Safe
C# type safe code can only access the memory location that it
has permission to execute. Therefore it improves a security of the
program.
5) Interoperability
Interoperability process enables the C# programs to do almost
anything that a native C++ application can do.
6) Scalable and Updateable
C# is automatic scalable and updateable programming
language. For updating our application we delete the old files and
update them with new ones.
15. C# FEATURES
7) Component Oriented
C# is component oriented programming language. It is the
predominant software development methodology used to develop
more robust and highly scalable applications.
8) Structured Programming Language
C# is a structured programming language in the sense that we
can break the program into parts using functions. So, it is easy to
understand and modify.
9) Rich Library
C# provides a lot of inbuilt functions that makes the
development fast.
10) Fast Speed
The compilation and execution time of C# language is fast.
16. .NET FRAMEWORK & ITS COMPONENTS
• .NET is a software framework that is designed and developed by
Microsoft.
• It is a virtual machine for compiling and executing programs
written in different languages like C#, VB.Net, etc.
• It is used to develop Form-based applications, Web-based
applications, and Web services. The first version of the .NET
framework was 1.0 which came in the year 2002 and the current
version is 4.7.1.
• .NET Framework supports more than 60 programming languages
in which C# and VB.Net are main programming languages.
18. .NET FRAMEWORK & ITS COMPONENTS
1. Common Language Runtime(CLR):
• CLR is the basic and Virtual Machine component of the
.NET Framework.
• It is the run-time environment in the .NET Framework that
runs the codes and helps in making the development
process easier.
• It is responsible for managing the execution of .NET
programs regardless of any .NET programming language.
• It also helps in the management of code, as code that
targets the runtime is known as the Managed Code and
code doesn’t target to runtime is known as Unmanaged
code.
19. .NET FRAMEWORK & ITS COMPONENTS
2. Framework Class Library(FCL):
• It is the collection of reusable, object-oriented class libraries
and methods, etc that can be integrated with CLR.
• Also called the Assemblies. It is just like the header files in
C/C++ and packages in the java.
• Installing .NET framework basically is the installation of CLR
and FCL into the system.
20. .NET FRAMEWORK & ITS COMPONENTS
3. Common Intermediate Language:
• It is a set of instructions that are platform-independent and
are generated by the language-specific compiler from the
source code.
• It is also known as the Microsoft Intermediate Language
(MSIL).
21. .NET FRAMEWORK & ITS COMPONENTS
4. Garbage Collector(GC):
• Automatic memory management is made possible by Garbage
Collection in .NET Framework.
• When a class object is created at runtime, certain memory
space is allocated to it in the heap memory.
• However, after all the actions related to the object are
completed in the program, the memory space allocated to it is
a waste as it cannot be used. In this case, garbage collection
is very useful as it automatically releases the memory space
after it is no longer required.
• Garbage collection will always work on Managed Heap and
internally it has an Engine which is known as the Optimization
22. .NET FRAMEWORK & ITS COMPONENTS
5. Just-In-Time(JIT) Compiler:
• Just-In-Time compiler(JIT) is a part of Common Language
Runtime (CLR) in .NET which is responsible for managing the
execution of .NET programs regardless of any .NET
programming language.
• A language-specific compiler converts the source code to the
intermediate language.
• This intermediate language is then converted into the machine
code by the Just-In-Time (JIT) compiler. This machine code is
specific to the computer environment that the JIT compiler
runs on.
23. .NET FRAMEWORK & ITS COMPONENTS
6. Managed Code:
• A code that is written to aimed to get the services of the
managed runtime environment execution like CLR(Common
Language Runtime) in .NET Framework is known as Managed
Code.
• It always implemented by the managed runtime environment
instead of directly executed by the operating system.
24. .NET FRAMEWORK & ITS COMPONENTS
7. Unmanaged Code:
• A code that is directly executed by the operating system is
known as Unmanaged code.
• It always aimed at the processor architecture and depends
upon computer architecture.
• When this code is compiled it always tends to get a specific
architecture and always runs on that platform.
25. VISUAL STUDIO
• Visual Studio is an Integrated Development Environment(IDE)
developed by Microsoft to develop GUI(Graphical User Interface),
console, Web applications, web apps, mobile apps, cloud, and
web services, etc.
• With the help of this IDE, you can create managed code as well as
native code. It uses the various platforms of Microsoft software
development software like Windows store, Microsoft Silverlight,
and Windows API, etc. It is not a language-specific IDE as you can
use this to write code in C#, C++, VB(Visual Basic), Python,
JavaScript, and many more languages.
• It provides support for 36 different programming languages. It is
available for Windows as well as for macOS.
26. C# IDE
• The easiest way to get started with C#, is to use an IDE.
• An IDE (Integrated Development Environment) is used to edit and
compile code.
• In our tutorial, we will use Visual Studio Community, which is free
to download
from https://visualstudio.microsoft.com/vs/community/.
• Applications written in C# use the .NET Framework, so it makes
sense to use Visual Studio, as the program, the framework, and
the language, are all created by Microsoft.