Interview Questions on .Net Framework
What is .Net framework?
In case of OS independent languages code executes under special software known as “Framework”.
“Framework is software which will mask the functionalities of an OS and makes the code to execute under its control” providing features like OS independency, security and automatic memory management.
What is CLR?
CLR is the core component of the .net framework responsible in execution of a .net application. It contains various things under it.
What is CLS?
What is CTS?
According to this the data types that are present under every .net language should adopt similar structure. i.e. sizes of similar types should be uniform. The names of the types will not be similar in all these languages. But similar types present in different languages even if they don’t have the same name will have the same size.
When we use a type in any language after compilation that type gets converted into “IL” type as following
What is CIL?
Dotnet is a collection of languages which allows writing the source code in any dotnet language but once we compile it, it gets converted into CIL (Common Intermediate Language). CIL code can be executed on any machine with the help of CLR which takes the responsibility of converting CIL code into machine code specific to the OS.
What is Assembly?
Whenever a project is compiled it generates an output file that contains IL code of all items in the project known as assembly.
These assemblies are what we carry on the client machines when the application has to be deployed. So they are referred as units of deployment. An assembly file can have an extension of either .exe or .dll
Can we consume classes of a project from other classes of same project?
Yes, we can consume them directly because all those classes were under same project and will be considered as a family.
Can we consume classes of a project from other classes of other project?
Yes, we can consume but not directly as they are under different projects, first we need to add reference of the assembly in which the class is present to the project who wants to consume it.
How to add reference of an assembly to a project?
To add a reference of an assembly to a project, Open solution explorer
Now we can consume classes of that assembly referring with their namespace.
Define shared assembly?
An assembly that resides in a centralized location known as GAC (Global Assembly Cache) and provides resources to any no.of projects that wants to consume is known as shared assemblies. If an assembly is shared multiple copies will not be created even if being consumed by multiple projects, only a single copy under GAC serves all the projects. GAC is a folder that is present under the Windows folder.
C:\Windows\assembly
What assemblies can be copied into GAC?
|
Monday, May 5, 2014
Interview Questions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment