| 1 |
What is .NET Framework? |
| Ans: |
The .NET Framework has two main components: the common language runtime and the .NET Framework class library. You can think of the runtime as an agent that manages code at execution time,providing core services such as memory management, thread management, andremoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness.The class library, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line orgraphical user interface (GUI) applications to applications based on the latestinnovations provided by ASP.NET, such as Web Forms and XML Web services. |
|
| |
| 2 |
What are Name spaces? |
| Ans: |
The namespace keyword is used to declare a scope. This name space scope lets you organize code and gives you a way to create globally-unique types. Even if you do not explicitly declare one, a default namespace is created. This unnamed name space,sometimes called the global namespace, is present in every file. Any identifier in theglobal namespace is available for use in a named namespace. Namespaces implicitly have public access and this is not modifiable. |
|
| 3 |
What is CLR? |
| Ans: |
The CLS is simply a specification that defines the rules to support language integrationin such a way that programs written in any language, yet can interoperate with one another, taking full advantage of inheritance, polymorphism, exceptions, and other features. These rules and the specification are documented in the ECMA proposed standard document, "Partition I Architecture". |
|
| |
| 4 |
Is .NET a runtime service or a development platform? |
| Ans: |
It's both and actually a lot more. Microsoft .NET includes a new way of delivering software and services to businesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The .NET frameworks SDK consists of two parts: the .NET common language runtime and the .NET class library. In addition, the SDK also includes command-line compilers for C#, C++, JScript, and VB. You use these compilers to build applications and components. These components require the runtime to execute so this is a development platform. |
|
| 5 |
What is MSIL, IL? |
| Ans: |
When compiling to managed code, the compiler translates your source code intoMicrosoft intermediate language (MSIL),which is a CPU-independent set of instructions that can be efficiently converted to native code. 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. Microsoft intermediate language (MSIL) is a language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language runtime includes a JIT compiler for converting MSIL to native code. |
|
| 6 |
Can I write IL programs directly? |
| Ans: |
Assembly MyAssembly {}
.class MyApp {
.method static void Main() {
.entrypoint
ldstr "Hello, IL!"
call void System.Console::WriteLine(class System.Object)
ret
}
}. |
|
| 7 |
What is CTS? |
| Ans: |
The common type system defines how types are declared, used, and managed in theruntime, and is also an important part of the runtime's support for cross-language integration.The common type system supports two general categories of types,eachofwhich isfurther divided into subcategories:
• Value types
Value types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations.
• Reference types
Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates. |
|
| 8 |
What is JIT (just in time)? how it works? |
| Ans: |
Before Microsoft intermediate language (MSIL) can be executed, it must beconverted by a .NET Framework just-in-time (JIT) compiler to native code, which is CPU-specific code that runs on the same computer architecture as the JIT compiler.
Rather than using time and memory to convert all the MSIL in a portable executable (PE) file to native code, it converts the MSIL as it is needed during execution and stores the resulting native code so that it is accessible for subsequent calls.The runtime supplies another mode of compilation called install-time code generation.The install-time code generation mode converts MSIL to native code just as the regular JIT compiler does, but it converts larger units of code at a time, storing the resulting native code for use when the assembly is subsequently loaded and executed.
As part of compiling MSIL to native code, code must pass a verification process unless an administrator has established a security policy that allows code to bypass verification. Verification examines MSIL and metadata to find out whether the code can be determined to be type safe, which means that it is known to access only the memory locations it is authorized to access. |
|
| 9 |
What is strong name? |
| Ans: |
A name that consists of an assembly's identity—its simple text name, version number,and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly. |
|
| 10 |
What is portable executable (PE)? |
| Ans: |
The file format defining the structure that all executable files (EXE) and Dynamic LinkLibraries (DLL) must use to allow them to be loaded and executed by Windows. PE isderived from the Microsoft Common Object File Format (COFF). The EXE and DLL filescreated using the .NET Framework obey the PE/COFF formats and also add additionalheader and data sections to the files that are only used by the CLR. The specificationfor the PE/COFF file formats is available. |
|
|