• Save
Dot net framework
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Dot net framework

  • 1,428 views
Uploaded on

I am not the author of this file but wanted to collect it for study purpose.

I am not the author of this file but wanted to collect it for study purpose.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • IT Pathshala, Noida-Sector-63, offers Guaranteed JOB with .NET Training Programs.

    PAY US ONLY IF YOU GET A JOB!

    CALL US - +91-9871350999 or +91-8800394970

    Technology Centre Address: H-110, Sector-63, Noida (UP)

    Program Takeaways:

    - GUARANTEED JOB in your technology domain
    - Live Major Project development
    - Experience Letter on Training Completion
    - Certification on Training Completion
    - Project Source Code available in CD

    Program Highlights:

    - 100% Guaranteed Job – Don’t pay us if you don’t get a JOB!
    - Industry Ready Courses
    - LIVE International Project Experience
    - Exposure to corporate culture at our IT services facility
    - Networking & Interaction with Industry Experts
    - Training Provided by a reputed IT Company
    - Live Project Source Code made available in CD
    - Technology certification and experience letter at program completion
    - Online Study Content

    CALL US - +91-9871350999 or +91-8800394970

    Our website: www.itpathshala.com
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
1,428
On Slideshare
1,428
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. .NET Framework & C#
  • 2.
    • .NET Framework
      • Problem background
      • Solution
      • Common Language Runtime (CLR)
    • MS Intermediate Language
      • MSIL Structure
      • MSIL and Java bytecode
    • Introduction to C# language
      • C# Structure
      • C# Features
  • 3. Problems Background
    • Good code is hard to write
    • All system features in any language
    • COM problems
    • Platform Interoperability
    • Automatic memory management
    • Object-Oriented features in and between all PLs
    • Safety & Security
    • Better Access to OS functions
    • Interoperate with COM (both as client & server)
  • 4. Solution (Common Language Runtime) Managed Code in Common Language Runtime Requests for existing feature New CLR-Only Feature Common Language Runtime Managed Code Win 32 OS
  • 5. Solution (Microsoft Intermediate Language) Different Languages are Compiled into MSIL Source code : Any languages MS Intermediate Language Platform specific code Development tools Just-In-Time compiler
  • 6. .Net platform features
    • Automatic memory management
    • Explicit Versioning
    • OO features in any languages
    • Accessing system functionality throw a hierarchical namespace
    • Code security
    • Interoperability with COM
  • 7. Costs:
    • OS got harder to write
    • More memory and CPU time
  • 8. CLR structure
  • 9. Compare with traditional ways C# VB C++ J-script other Compiler Intermediate Language JIT econoJIT PreJIT Executables .NET CLR Compiler C++ Executable Existing OS Machine hardware
  • 10. A simple example
  • 11. Imports Microsoft.VisualBasic ' Declare the namespace that clients will use to access ' the classes in this component Namespace TimeComponentNS Public Class TimeComponent Public Function GetTime(ByVal ShowSeconds As Boolean) As String If (ShowSeconds = True) Then Return Now.ToLongTimeString Else Return Now.ToShortTimeString End If End Function End Class End Namespace TimeComponent.vb
  • 12. // Import the namespaces that this program uses, thereby allowing // us to use the short names of the functions inside them. using System ; using TimeComponentNS ; class MainApp { // The static method "Main" is an application's entry point public static void Main() { // Declare and create a new component of the class // provided by the VB server we wrote TimeComponent tc = new TimeComponent ( ) ; // Call the server's GetTime method. Write its // resulting string to a console window. Console.Write (tc.GetTime (true)) ; } } using System ; using TimeComponentNS ; class MainApp { public static void Main() { // Declare and create a new component of the class // provided by the VB server we wrote TimeComponent tc = new TimeComponent ( ) ; // Call the server's GetTime method. Write its // resulting string to a console window. Console.Write (tc.GetTime (true)) ; } } Timeclient.cs
  • 13. Assembly
    • A logical collection of one or more exe and dll file containing an application’s code and resources
    • It contains
    • 1-Codes in MSIL
    • 2-Manifest
    • A metadata description of the code and resources
  • 14. Metadata
    • What classes and method it contains
    • What external objects it requires
    • What version of code it represents
  • 15. Manifest example (TimeComponent.dll) .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4.. .ver 1:0:2411:0 } .assembly extern Microsoft.VisualBasic { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 7:0:0:0 } .assembly TimeComponent { .hash algorithm 0x00008004 .ver 0:0:0:0 } .module TimeComponent.dll // MVID: {144ACC38-E825-45C4-83A6-C2A9E5A901DD} .imagebase 0x00400000 .subsystem 0x00000002 .file alignment 512 .corflags 0x00000001 // Image base: 0x032a0000
  • 16. Private or Public
    • Private
    • In client directory
    • Public (shared)
    • In Global Assembly Cache (GAC)
    • winntassembly
  • 17. Namespaces
    • A logical division within which a name need to be unique
    • The best way to handle a large list of system objects and functions
    • System namespace (implemented in several separated DLLs
    • We can import a namespace
    • Your code can have its own namespace
  • 18. Versioning
    • DLL Hell
    • Replacing a DLL used by an existing client, with a newer version (or vice versa)
    • .NET provides a standard way to specify
    • version
    • Each client assembly uses its own specified versions of related assemblies
  • 19. Object oriented programming
    • Whether to smarten up non-object oriented languages or dump down OO languages
    • .NET provides all languages with inheritance and constructors features
    • Virtual Object Model
  • 20.
    • All .NET classes inherit from the base class System.Object
      • Equals
      • GetHashCode
      • GetType
      • ToString
  • 21. Cross-language inheritance
    • Because of the standardized IL architecture
    • you can inherit form a class in another
    • language
    • For example:
    • System.Object
  • 22. .NET memory management
    • .NET CLR provides all languages with automatic memory management.
    • Garbage collector automatically removes
    • unreferenced objects
    • You can force a garbage collection manually
  • 23. Interoperability with COM objects
      • .NET Supports interoperation with COM object as client or server via a runtime callable wrapper or a COM Callable Wrapper
  • 24. Using COM objects from .NET objects
  • 25. Using .NET objects from COM objects
  • 26. Transaction in .NET
    • Transaction ensure the integrity of databases during complex operations
    • Native .NET objects can also participate in transactions with a simple attribute
  • 27. Structured exception handling
    • .NET provides structured exception handling as a fundamental feature available in and between all languages
    • The exception handler can tell exactly where the exception originated by using a stack trace
  • 28. Code access security
    • Most software comes from web
    • A user doesn’t know whether a Web code is safe or not
    • .NET allows an administrator to specify privileges that each managed code has.
    • You can specify these privileges in three level
    • by modifying XML-based files
      • Enterprise
      • Machine
      • User
    • winntmicrosoft.netframework[c.v.]config