0% found this document useful (0 votes)
10 views11 pages

C# & .NET Framework Course Overview

.net

Uploaded by

sahugungun76
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

C# & .NET Framework Course Overview

.net

Uploaded by

sahugungun76
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

RGM COLLEGE OF ENGG&TECH C# & .

NET FRAMEWORK

(A0510155) C# & .NET FRAMEWORK


(common to CSE & IT)
AIM:
 To cover the fundamental concepts of the C# language and the .NET framework.
OBJECTIVE:
 The student will gain knowledge in the concepts of the .NET framework as a whole and the
technologies that constitute the Framework.
 The student will gain programming skills in C# both in basic and advanced levels.
 By building sample applications, the student will get experience and be ready for large-scale
projects.
OUTCOMES:
 To get knowledge of windows programming.
 To get knowledge on server side programming.
 To gain knowledge on web services and dynamic link libraries.

UNIT I
INTRODUCTION to C#: Introducing C#, Understanding .NET, Overview of C#, Literals,
Variables, Data Types, Operators, Expressions, Branching, Looping, Methods, Arrays, Strings,
Structures, Enumerations.
UNIT II
OBJECT ORIENTED ASPECTS OF C#: Classes, Objects, Inheritance, Polymorphism, Interfaces,
Operator Overloading, Delegates, Errors and Exceptions.
UNIT III
WINDOWS APPLICATIONS: Drawbacks of Console Applications, Container Controls, Non
Container Controls, Developing Windows Application from Notepad and Visual Studio, Events,
Types of Events – Mouse, Focus, Drag, Key and Other Related Events, Building Windows
Applications.
[Link]: Problems with File Handling, Data Source Communication, Drivers and Providers,
Introduction of [Link], [Link] Namespaces, [Link] Objects, Accessing Data with
[Link].
UNIT IV
BUILDING [Link] WEB PAGES: HTML form Development, Client side Scripting, Server side
Scripting, Web applications and Web servers, HTTP, Advantages Using [Link], [Link]
Application, [Link] Namespaces, [Link] Web Page Structure, Creating Sample C# Web
Applications, [Link] Web Page Execution Architecture, Debugging and Tracing of [Link].
UNIT V
2 School of Computer Science & Engineering | RGMCET
RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

[Link] WEB CONTROLS: Web Form Structures, Introduction to Web Form controls, Server
Side Controls, Web Server Controls, GET and POST, Page Submission, Web Page Creation
Techniques, Redirection between Web Pages, Validation Controls.
UNIT VI
WEB SERVICES: Web Services, Web Service Architecture, WSDL, Building WSDL Web Service.
CONFIGURING .NET ASSEMBLIES: Private Assemblies, Shared Assemblies, and Versioning.
MULTITHREADED PROGRAMMING: Thread Class, Life Cycle of a Thread, Steps for Creating
a Thread, Thread Synchronization.

3 School of Computer Science & Engineering | RGMCET


RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

UNIT I
.NET:
 .NET stands for Network Enable Technology which is developed by Microsoft Corporation.
 .NET is a collection of languages like VC#.NET, VC++.NET, [Link] and so on.
 .NET is a Framework which provides a common platform to Execute or Run the applications
developed in various programming languages.
.NET Objectives: The .NET Framework is designed to fulfil the following objectives
 Platform independent: As .exe and .dll files work in any operating system with the help of
CLR, hence .Net is called as platform independent.
 (.exe) is executable file, it consists of executable code, and (.dll) is dynamic link library file it
consist of reusable code. .exe and .dll files contains the code in the format of byte code is also
called as MSIL (Microsoft intermediate language) code.
 Machine language is also called as native code. CLR is common language runtime; CLR
software converts byte code into native code. Dot Net is platform independent but CLR
software is platform dependent.
One question arises if we go in detail, that is either Dot Net is pure platform independent or
not? Answer is Dot Net is partially platform dependent, as of now CLR software's are not
available for DOS operating system and Windows 95.

 Language independent: As Dot Net programming logic can be developed in any Dot Net
framework compatible languages; hence Dot Net is called as language independent.

4 School of Computer Science & Engineering | RGMCET


RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

Microsoft is introducing approximately 40 languages into Dot Net framework, out of which
as of now approximately 24 languages and one specification are released.
Ex: VC#.Net,[Link],VC++,VJ#,VF#,PHP,COBOL,PERL,PHYTHON,SMALLTALK,JSCRI
PT...etc One specification is [Link].
 Language interoperability: It is a concept of developing an application with the help of
more than one .NET programming language. After an application is compiled, the source
code will be converted into byte code. Byte code follows a standard instruction set provided
by cls(common language specification).Cls provides common rules and syntaxes for all the
languages and cls also provides common data types for all the languages and these common
data types are called as CTS(common type system).
C++ C# VB .NET
int(2) short(2) short(2)
long(4) int(4) integer(2)
long(8) long(8)
SYSTEM.INT16
SYSTEM.INT32
SYSTEM.INT64
 It supports object-oriented programming environment.
 It supports to work with database programming with the help of [Link].
 It supports to work with WPF (windows presentation foundation) for developing animations.
 It Provides environment for developing various types of applications, such as Windows-
based applications and Web-based applications
 It Supports to develop 3-tier architecture with the help of Dot Net remoting
 Supports to develop game programming with the help of multi-threading
 Supports to work with link programming
Managed Code: The code is developed and running under the control of the CLR is often
termed managed code
Unmanaged code: The code which takes OS help while execution is called as unmanaged code
Note: Managed code is faster in execution.
Unmanaged code

CLR
.net .dll Output
.exe
Managed code
.NET Framework:
 The .Net framework is a revolutionary platform that helps you to write the following types of
applications:
Windows applications
5 School of Computer Science & Engineering | RGMCET
RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

Web applications
Web services
 The .NET framework applications are multi-platform applications.
 The .NET framework has been designed in such a way that it can be used by .NET
framework compatible languages ( C#, C++, Visual Basic, Jscript, COBOL, etc). All .NET
framework compatible languages can access the framework as well as communicate with
each other.
 The .NET frame work contain three major things that is
 Languages—VB,C#,PASCAL,COBOL
 Technology—[Link],[Link]
 Servers—SQL SERVER,SHARE POINT SERVER
 In platform independent languages, the code gets executed under the control of special
software called framework.
Example: java-->JVM
.NET-->CLR
 Framework: A framework is a software which masks the functionalities of a OS and makes
the code to execute under its control .Frame work provides the following basic features like
 Platform independency
 Security
 Memory management
 Microsoft has started the development of .NET framework in late 90‘s originally under the
name of NGWS (next generation windows services).
 To develop the framework first the Microsoft has prepared a set of specifications known as
CLI (common language infrastructure).
 The .NET specifications are open to all (everyone can develop) which is standardized under
ISO (International Standards organization) AND ECMA(European computer manufacture
association).
 CLI specification talks about four important aspects that is
CLS (common language specification)
CTS (common Type system)
BCL (Base class libraries)
VES (Virtual execution system) or CLR (common language runtime)
 .NET framework versions
Versions Release Date
6 School of Computer Science & Engineering | RGMCET
RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

1.0 2002
1.1 2003
2.0 2005
3.0 2006
3.5 2007
4.0 2009
 The .Net framework consists of an enormous library of codes used by the client languages
such as C#. Following are some of the components of the .Net framework:
 Common Language Runtime (CLR)
 The .Net Framework Class Library
 Common Language Specification
 Common Type System
 Metadata and Assemblies
 Windows Forms
 [Link] and [Link] AJAX
 [Link]
 Windows Workflow Foundation (WF)
 Windows Presentation Foundation
 Windows Communication Foundation (WCF)
 LINQ
.NET framework architectural diagram: The .NET framework is one of the tool provided by
the .NET infrastructure and tools component of the .NET platform. The .NET framework provides an
environment for building, deploying and running web services and .NET applications.

PLINQ TPL

LINQ [Link] ENTITY FRAMEWORK

WPF WCF WF CARD SPACE

[Link] [Link] WIN FORMS

BASE CLASS LIBRARIES

COMMON LANGUAGE RUNTIME(CLR)


Common language runtime (CLR):
 CLR is the heart of the .NET framework. It is the execution engine of .NET framework,
where all .net applications are running under the supervision of CLR. The main function of
CLR is to convert the managed code into native code and then execute the program. CLR acts

7 School of Computer Science & Engineering | RGMCET


RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

as a layer between OS and the applications written in .NET languages. CLR provides various
features to applications like
 Security
 Platform independency
 Automatic memory management
 Runtime error handling
 Code verification
 Compilation
 Thread management
 The components of CLR are
Class Loader: It is used to load all the classes at runtime for the execution of an application.
JIT Compiler: It is responsible for the conversion of MSIL (byte code) into machine code
(native code).
Code Manager: Is responsible for managing code at runtime.
Garbage Collector: The .NET garbage collector is responsible for automatic memory
management, where memory management is a process of allocation and de-allocation of
memory that is required for a program execution. Memory management is of two types
1. Manual/explicit memory management: In this the programmers are responsible
for allocation and deallocation of memory that is required for a program execution.
2. Automatic/implicit memory management: In this case the garbage collector will
take care of allocation and deallocation process of memory.
The garbage collector will allocates the memory for an object when and where they are
required and also deallocates the memory of those objects once they become unused under
the program. The unused object of a program is called garbage and deallocate immediately.
Security Engine (manager): It is responsible for taking care of the security of the
application that is security engine will not allow the application to interact directly with the
operating system (or) OS to interact with the application.
Type Checker: It enforces strictness in type checking that is type checker will verify the
types used in the application with CTS (or) CLS standards supported by the CLR.
Common type system: Common Type System (CTS) describes a set of types that can be
used in different .Net languages in common. That is, the Common Type System (CTS) ensure
that objects written in different .Net languages can interact with each other.

8 School of Computer Science & Engineering | RGMCET


RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

Microsoft Intermediate Language (MSIL): MSIL stands for Microsoft Intermediate


Language. We can call it as Intermediate Language (IL) or Common Intermediate Language
(CIL). During the compile time, the compiler convert the source code into Microsoft
Intermediate Language (MSIL) .Microsoft Intermediate Language (MSIL) is a CPU-
independent set of instructions that can be efficiently converted to the native code. During the
runtime the Common Language Runtime (CLR)'s Just In Time (JIT) compiler converts the
Microsoft Intermediate Language (MSIL) code into native code to the Operating System.

Thread Support: It allows multithreading support to our application.


Debug engine: It allows proper debugging of an application.
Base class library: It provides all the types that an application need at runtime.
Exception manager: Handles all the exception for an application during runtime.
COM Marshaller: It provides interoperability to our applications.
 Base class libraries:
 A library is a set of reusable functionalities where each and every programming language has
built in library like header files in c/c++ ,packages in java similarly .NET languages have
built in libraries known as base class libraries .the speciality of these library is that they can
be consumed under any .NET language(BCL are the best example of language
interoperability because those library are developed in C# language and can be consumed in
any .NET framework compatible languages.
 The very popular namespace in base class library is system
 We can use the base class library in system namespace for many different tasks including.
 Input/output operations
 String handling
 Managing arrays, lists and maps
 Accessing files and file systems
 Security
9 School of Computer Science & Engineering | RGMCET
RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

 Windowing
 Windows messages
 Drawing
 Database management
 Managing errors and exceptions
 Win form technology is used to develop windows based applications.
 [Link] is used to build rich internet based web applications
 [Link] is used to create Data Access Layer to query and manipulate data from underlying data
source like SQL Server, Oracle etc.
 WPF (windows presentation foundation) is used to create applications with a rich user
experience. It includes application User Interface, 2D graphics, 3D graphics and multimedia. It
takes advantage of hardware acceleration of modern graphic cards. WPF makes the User
Interface faster, scalable and resolution independent.
 WCF (windows communication foundation) is used for building and developing services based
on Web Services standards.
 WF (WWF) stands windows workflow foundation, which is used to build process oriented
business workflow and rules engine.
 LINQ (language integrated query) allows you to query(communicate) the data from the
various data sources (like SQL databases, XML documents, [Link] Datasets, Various Web
services and any other objects such as Collections, Generics etc.) using a SQL Query like syntax
with .Net framework languages like C# and VB.
 [Link] Entity Framework provides added features under the traditional [Link]. This is
used to query and store data into to the relational databases (like SQL Server, Oracle, DB2 etc.)
in ORM (Object-relational mapping) fashion.
 TPL (Task Parallel Library): The purpose of TPL is to make the developers more productive
by simplifying the process of adding parallelism and concurrency to applications.
 PLINQ (Parallel Language Integrated Query): It is used to maximize processor utilization
with increased throughput in a multicore architecture.
The Origins of .NET Technology: The Origins of the .NET Technology are
 OLE Technology (Object Linking and Embedding): Object linking and embedding (OLE)
was developed by Microsoft in the early 1990‘s to enable inter process [Link]
provides support to achieve the following.
 To embed documents from one application into another application.

10 School of Computer Science & Engineering | RGMCET


RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

 To enable one application to manipulate objects located in other application.


OLE Technology enabled uses to develop applications which required interoperability
between various modules such as MS-Word and MS-Excel
 COM Technology (Component Object Model): Till the advent of com technology, the
monolithic approach had been used for developing software. But when the programs became
too large and complex, the monolithic approach leads to a number of problems in terms of
maintainability and testing of software. To overcome these problems Microsoft introduced a
component based model for developing software. In this approach a program is divided into
number of independent components where each one offers a particular task. Each Component
can be developed and tested independently and then integrated into the main system. This
technology is called component object model (COM).
Benefits:
1. It reduces the complexity of software.
2. It enhances software maintainability
3. It enables distributed development among multiple departments (or) organizations.
 .NET Technology (Network Enable Technology):
1. It is a third-generation component model which provides a new level of interoperability
Compared to COM technology.
2. It Enables Application level communication by Microsoft intermediate language(MSIL or
CIL) mechanism.
3. .NET Technology allows true cross-language integration with MSIL.
4. .NET Technology contains MSIL and also includes other technologies and tools that
enable users to develop and implement applications easily.
.NET Languages: The .NET framework is a language neutral. So we can use the number of
languages for developing .NET applications. They include
Native to .NET:
 C#
 Visual basic
 C++
 Jscript
Third-Party languages:
 COBOL
 Eiffel
 Perl
 Python
 Small Talk
11 School of Computer Science & Engineering | RGMCET
RGM COLLEGE OF ENGG&TECH C# & .NET FRAMEWORK

 Mercury
 Scheme
All .NET languages are not created equal. Some can use the components of other languages,
some can use the classes produced in other languages to create objects, and some languages can
extend the classes of other languages using the inheritance features of .NET.
Benefits of the .NET Framework
 Simple and faster system development
 Enhanced built in functionality.
 It supports rich oop concepts
 Integration of different applications into one platform.
 Ease of deployment and execution
 Interoperability with existing applications.
 Wide range of scalability
 Simple and easy to build sophisticated development tools.
 Fewer bugs
 Potentially better performance.
Features of .NET:
 Language independency
 Base class library‘s
 Portability
 COM interoperability
 CLR
 Memory management
 Simplified development
Integrated Development Environment (IDE) for C#: An IDE is a tool that helps you write your
programs Microsoft provides the following development tools for C# programming:
 Visual Studio 2010 (VS)
 Visual C# 2010 Express (VCE)
 Visual Web Developer
The last two are freely available from Microsoft official website. Using these tools, you can
write all kinds of C# programs from simple command-line applications to more complex
applications. You can also write C# source code files using a basic text editor like Notepad, and
compile the code into assemblies using the command-line compiler, which is again a part of
the .NET Framework.
Visual C# Express and Visual Web Developer Express edition are trimmed down versions
12 School of Computer Science & Engineering | RGMCET

You might also like