Social Networks

Chapter 1: Basic .NET Framework

1. What is an IL?

A. MSIL stands for Microsoft Intermediate Language in short MSIL or IL(Intermediate Language). When you compile a program the CLR will compile the code into MSIL code. Which will then be included in the assembly[exe/dll]. When you run the program in client place. The clr will manage to convert the MSIL into machine language by a process called Jitting.

When we compile our .Net Program using any .Net compliant language like (C#, VB.NET, C++.NET) it does not get converted into the executable binary code but to an intermediate code, called MSIL or IL in short, understandable by CLR. MSIL is an OS and H/w independent code. When the program needs to be executed, this MSIL or intermediate code is converted to binary executable code, called native code. The presence of IL makes it possible the Cross Language Relationship as all the .Net compliant languages produce the similar standard IL code.

 

2. What is a CLR?

A. CLR Stands For common language runtime. It is the implementation for CLI Common language implementation. The core run time engine in the Microsoft .Net framework for executing .net applications. The CLR Supplies Managed code with services such as cross language integration, code access security object life time management, resource management, type safety, pre-emptive threading, metadata services(type reflections) and debugging and profiling support.

The most important part of the .NET Framework is the .Net Common Language Runtime (CLR) also called .Net Runtime in short. It is a framework layer that resides above the Operating System and handles/manages the execution of the .NET applications. Our .Net programs don’t directly communicate with the Operating System but through CLR.

 

3. What is CTS?

A. CTS stand for Common Type System.
The CTS makes available a common set of data types so that compiled code of one language could easily interoperate with compiled code of another language by understanding each others’ data types.

 

A fundamental part of the .NET Framework’s Common Language Runtime (CLR), the CTS specifies no particular syntax or keywords, but instead  defines a common set of types that can be used with many

different language syntaxes.

 

4. What is a CLS (Common Language Specification)?

A. Common Language Specification  (CLS):The Common Language Specification (CLS) describes a set of features that different languages have in common.

The CLS includes a subset of the Common Type System (CTS).

 

5. What is a Managed Code?

A. By managed code, it means that the complete life cycle and execution is managed by the .NET Common Language Runtime

(CLR). The .NET CLR manages the memory on behalf of the managed code, performs garbage collection on the managed heap, perform assembly validation and assembly (component) resolution on behalf of the program. The CLR also maintains the security constraints applied to the managed code

 

Managed code is code that is written to target the services of the Common Language Runtime. In order to target these services, the code must provide a minimum level of information (metadata) to the runtime. All C#, Visual Basic .NET, and JScript .NET code is managed by default. Visual Studio .NET C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/CLR).

 

6. What is a Assembly?

A. The .NET assembly is the standard for components developed with the Microsoft.NET. Dot NET assemblies may or may not be executable, i.e., they might exist as the executable (.exe) file or dynamic link library (DLL) file. All the .NET assemblies contain the definition of types, versioning information for the type, meta-data, and manifest. The designers of .NET have worked a lot on the component (assembly) resolution.

 

7. What are the different types of Assembly?

There are three kinds of assemblies in .NET;

Private Assemblies.

Shared Assemblies.

Satellite Assemblies.

Private assemblies are simple and copied with each calling assemblies in the calling assemblies folder.

Shared assemblies (also called strong named assemblies) are copied to a single location (usually the Global assembly cache). For all calling assemblies within the same application, the same copy of the shared assembly is used from its original location. Hence, shared assemblies are not copied in the private folders of each calling assembly. Each shared assembly has a four part name including its face name, version, public key token and culture information. The public key token and version information makes it almost impossible for two different assemblies with the same name or for two similar assemblies with different version to mix with each other.

An assembly can be a single file or it may consist of the multiple files. In case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules. A module in .NET is a sub part of a multi-file .NET assembly. Assembly is one of the most interesting and extremely useful areas of .NET architecture along with reflections and attributes, but unfortunately very few people take interest in learning such theoretical looking topics.

Satellite Assembly Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated witha given language and .NET Framework version. No core .NET Framework files are removed

unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files.

The Japanese .NET Framework version 1.1 adds satellite assemblies withlocalized resources in a ja subdirectory. An application that supports the .NET Framework version 1.1,

regardless of its language, always uses the same core runtime files

 

A8.  What is NameSpace?

A. A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code.

 

 

 

9. What is Difference between NameSpace and Assembly?

A. A namespace is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. For example, types MyCompany.FileAccess.A and MyCompany.FileAccess.B might be logically expected to have functionally related to file access. The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET application framework, or remoting functionality. Design tools can make use of namespaces to make it easier for developers to browse and reference types in their code.
The concept of a namespace is not related to that of an assembly. A single assembly may contain types whose hierarchical names have different namespace roots, and a logical namespace root may span multiple assemblies. In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

 

10. If you want to view an Assembly how do you go about it?

A. There Is No other tool to view or to get about assembly other than ILDASM.

 

Click here to read all the 32 Questions with answers Basic .Net Framework

 

Chapter 1: Basic .NET Framework

Chapter 2: NET Interoperability

Chapter 3: Threading

Chapter 4: Remoting and Webservices

Chapter 5: Caching Concepts

Chapter 6: OOPS

Chapter 7: ASP.NET

 

None found.

Leave a Reply

Your email address will not be published. Required fields are marked *

Allowed Tags:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>