Page 16 - Open Soource Technologies 304.indd
P. 16

Unit 1: Introduction to Visual Basic



            high-level language, but the IL does contain some abstract concepts such as base classes and  Notes
            exception handling, which is why the language is called intermediate. MSIL includes instructions
            for loading, storing, initializing, and calling methods on objects, as well as instructions for
            arithmetic and logical operations, control flow, direct memory access, exception handling, and
            other operations. When a compiler produces MSIL, it also produces metadata. Metadata describes
            the types in your code, including the definition of each type, the signatures of each type’s
            members, the members that your code references, and other data that the runtime uses at
            execution time.

            1.3.4 Just-In-Time Compiler

            CPU-independent MSIL code can be efficiently converted to native code using Just-in-Time (JIT)
            compiler, only when that portion of IL code is required for execution. JIT generated machine
            code is CPU-specific code that runs on the same computer architecture as the JIT compiler and it
            takes advantage of the added instruction sets offered by each CPU type.

            1.3.5 Executing Code

            When CLR executes a .NET method for the first time, it generates a processor specific native code
            from MSIL using the JIT compiler. The next time the method is run, the existing JIT-compiled
            native code is run. The process of JIT-compiling and then executing the code is repeated until
            execution is complete. CLR provides myriad set of services to managed components like garbage
            collection, versioning, interoperability with unmanaged code, etc.

            1.3.6 Assemblies

            An assembly is a collection of types and resources that forms a logical unit of functionality. All
            types in the .NET Framework must exist in assemblies; the common language runtime does not
            support types outside of assemblies. Each time you create a Microsoft Windows® Application,
            Windows Service, Class Library, or other application with Visual Basic .NET, you’re building a
            single assembly. Each assembly is stored as an .exe or .dll file.




               Note Although it’s technically possible to create assemblies that span multiple files, you’re
              not likely to use this technology in most situations.
            The .NET Framework uses assemblies as the fundamental unit for several purposes:
                 Security
                 Type Identity
                 Reference Scope
                 Versioning
                 Deployment

            1.3.7 Assembly Manifest

            Every assembly contains an assembly manifest, a set of metadata with information about the
            assembly. The assembly manifest contains these items:
                 The assembly name and version
                 The culture or language the assembly supports (not required in all assemblies)




                                             LOVELY PROFESSIONAL UNIVERSITY                                    9
   11   12   13   14   15   16   17   18   19   20   21