.Net Framework
 A programming infrastructure created by Microsoft

for building, deploying, and running applications and services that use .NET technologies, such as desktop applications and Web services.  .NET framework is a foundation class on which you can build robust applications .This framework comprises of web forms, window forms and console applications. .NET framework is basically a collection of services and classes.  This exists as a layer between .NET applications and underlying operating systems.

Web Services.NET.NET. IO. . XML.NET Framework: FCL & CLR  Common Language Runtime  Garbage collection  Language integration  Multiple versioning support more DLL hell!)  Integrated security  Framework Class Library  Provides the core functionality: (no ASP. ADO. Windows Forms. etc.The Core of .

. thread management.NET Framework Common Language Runtime  CLR manages code execution at runtime  Memory management. etc. Common Language Runtime Operating System .

.NET Framework Base Class Library  Object-oriented collection of reusable types  Collections.NET Framework (Base Class Library) Common Language Runtime Operating System . I/O. … . Strings.

NET Framework (Base Class Library) Common Language Runtime Operating System .NET and XML .NET Framework Data Access Layer  Access relational databases  Disconnected data model  Work with XML ADO ..

… ASP . Web services.NET and XML .NET Framework ASP. Windows GUI.NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO .NET Framework (Base Class Library) Common Language Runtime Operating System ..NET & Windows Forms  Create application’s front-end – Web-based user interface.

NET Web Forms Web Services Mobile Internet Toolkit ADO .NET and XML ..NET Framework (Base Class Library) Common Language Runtime Operating System .NET Framework Programming Languages  Use your favorite language C++ C# VB.NET Perl J# … Windows Forms ASP .

NET and XML ..NET Framework Common Language Specification C++ VB Common Language Specification… C# Perl J# ASP .NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO .NET Framework (Base Class Library) Common Language Runtime Operating System .

NET Visual Studio .NET ASP .NET and XML .NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO ..NET Framework (Base Class Library) Common Language Runtime Operating System .NET C++ C# VB Perl J# … Common Language Specification Visual Studio .NET Framework Visual Studio .

Net Runtime  Source File Compilers C++ C# Visual Basic VJ#  Compiler  Compiler Compiler Compiler Binaries Common Language Specification (CLS)  Runtime Common Language Runtime (CLR) ..

stored in the heap  Strings are a primitive data type now .Common Type System:  All .NET languages have the same primitive data types.NET language.NET  When communicating between modules written in any . stored in the stack  Reference types – passed by reference. the types are guaranteed to be compatible on the binary level  Types can be:  Value types – passed by value. An int in C# is the same as an int in VB.

NET language  A language that conforms to the CLS has the ability to take full advantage of the Framework Class Library (FCL)  CLS is standardized by ECMA .Common Language Specification (CLS)  Any language that conforms to the CLS is a .

Introduction to C# The first component oriented language in the C/C++ family Everything really is an object Next generation robust and durable software .

… Many useful tools and wizards Windows Forms Designer ASP.NET Framework Not necessary to build or run managed code The .NET Development tool that contains a rich set of productivity and debugging features Supports managed and unmanaged applications Supports C#.NET. C++.NET and XML VS.Visual Studio .NET Framework SDK includes command line compilers . VB.NET Web Forms Designer Web Services support SQL Server integration with ADO.NET is not part of the .

NET you can: Write code Design user interface Study documentation Debug Test Deploy Same tools for all languages Same tools for all platforms .VS.NET – Single Development Environment & Skill Set From Visual Studio.

etc. events Design-time and run-time attributes Integrated documentation using XML Enables one-stop programming No header files. Can be embedded in web pages . IDL. methods.Component Oriented Language: C# is the first “component oriented” language in the C/C++ family Component concepts are first class: Properties.

Compilation And Execution Compilation Source Code Language Compiler Assembly Metadata Code (IL) Native Code JIT Compiler Execution .

Assemblies DLL or EXE file Smallest deployable unit in the CLR Have unique version number No version conflicts (known as DLL hell) Contains IL code to be executed Security boundary – permissions are granted at the assembly level  Type boundary – all types include the assembly name they are a part of  Self-describing manifest – metadata that describes the types in the assembly       .

Metadata in Assembly Type Descriptions Classes Base classes classes Implemented interfaces Implemented interfaces Data members members Methods Methods Assembly Description Name Version Version Culture Other assemblies Other assemblies Security Permissions Security Permissions Exported Types Exported Types .

How to Start How to Start: Creation of a New Project  Compilation  Run the Application  Output  .

Creation of New Project: .

Creation of a new project: .

Creation of a new project: .

Creation of a new project: .

Building/Compiling a project: .

Executing/Running a project: .

Output of a project: .