Advanced C# and .NET Interview Questions and Answers Part 5

By
1.) How to find Method of assembly without using ILDASM ?                                       
Use Reflection concept.
Read More...

2.) What is Garbage collection in.NET and its uses ?                                                        
The Process of transitively tracing through all points to actively used objects in order to locate all objects that can be referenced and then arranging to reuse any heap memory that is in use to reduce the working space needed for the heap.

3.) What is Application Domain ?                                                                                             
The Application Domain provide a unit of isolation for the common language runtime.They created and run inside a process.They are usually created by a runtime host ,which is an application  that are responsible for loading the runtime into a process and executing user code within an application domain runtime host.It creates a process and a default application domain and runs managed codes inside it.
Example:- 
Runtime host are asp.net  ,internet explorer and winow shell. 

4.) What is Difference between user control ,web control and custom control in .NET  ?
  • The user control is a web based control.
  • Using user control ,we can easily create your own custom reusable controls.
  • The user controls are compiled ,when first request stored in server memory to reduce the response time for subsequent requests.
  • The user control has .ascx extension. 
5.) What are the types of assembly used in .NET  ?                                                           
  • Private
  • Public/shared
  • Satellite
6.) What is difference between call by value and call by reference  ?                         
More Details...

7.) What is CCW (com callable wrapper) ?                                                                           
You Know, A proxy object is  generated by the common language run time so that existing COM applications can use managed classes ,including .NET Framework classes,transparently.

8.) What is Code Access security (CAS) in .NET ?                                                              
CAS is the part of the .NET Security model that determines whether or not a piece of code is allowed to run , and what resources it can be used when it is running.

9.) How can we diagnose CAS Problem ?                                                                             
First we can ask caspole to tell ,what code group an assembly belongs to ,using caspol-rsg
similarly,we can ask what permission are being applied to a particular assembly using Caspol-rsp .

10.) Can i off the CAS ?                                                                                                                 
Yes,run as administrator mode following commands :-
Caspol -s off .

11.) How does an APPDmain get created ?                                                                           
The APPDomains are usually created by host,when we run a .NET application from the command line.

12.) What is Global assembly cache in .NET ?                                                                     
Each computer where the common language runtime is installed has a machine -wide code cache called the global assembly cache. The global assembly cache  stores assembly specially designed to be shared by several computer.
Ex. 
Create a storing name using sn.exe tool.
sn -k myfile.snk
Recompile the file
Gacutil - i myfile.dll

0 comments:

Post a comment

Powered by Blogger.