Dotnet Framework Questions

1. Parts of Manged Module ? (Source CLR via C# by Jeffrey Richter)


Part
Description
PE32 or PE32+ header

The standard Windows PE file header, which is similar to the Common Object File Format (COFF) header. If the header uses the PE32 format, the file can run on a 32-bit or 64-bit version of Windows. If the header uses the PE32+ format, the file requires a 64-bit version of Windows to run. This header also indicates the type of file: GUI, CUI, or DLL, and contains a timestamp indicating when the file was built. For modules that contain only IL code, the bulk of the information in the PE32(+) header is ignored. For modules that contain native CPU code, this header contains information about the native CPU code.
CLR header

Contains the information (interpreted by the CLR and utilities) that makes this a managed module. The header includes the version of the CLR required, some flags, the MethodDef metadata token of the managed module’s entry point method (Main method), and the location/size of the module’s metadata, resources, strong name, some flags, and other less interesting stuff.
Metadata
Every managed module contains metadata tables. There are two main types of tables: tables that describe the types and members defined in your source code and tables that describe the types and members referenced by your source code.

CLR Header
Code the compiler produced as it compiled the source code. At runtime, the CLR compiles the IL into native CPU instructions.


2. What is manifest ?

Manifest is another metadata that describes a set of files in the assembly.


3. What is Type-Safe?
 
Typesafe means that the compiler will validate types while compiling, and throw an error if you try to assign the wrong type to a variable.

Simple questions

1. CLR Stands for ?Common Language Runtime

2. How to force garbage collection to run?
GC.Collect()

3. Which integer type can hold a value of any size?
BigInteger

4. Which of the following method notifies garbage collector not to call finalize?
GC.SuppressFinalize()

5. Which is the root namespace for fundamental types in .Net framework?
System.Object

6. The code that runs under CLR is called ___?
Managed Code

Topics to be discussed.

1. CLR
2. GAC.
3.  GIT
4. Garbage collection
5. ILDASM and IL
6. Code Access Security
7. Framework version and features.

No comments:

Post a Comment

Pages