Set - 8

Question 46 :

Suppose I call a COM object from a .NET application, but COM object throws an error. What happens on the .NET end?

Answer :

COM methods report errors by returning HRESULTs; .NET methods report them by throwing exceptions. The runtime handles the transition between the two. Each exception class in the .NET Framework maps to an HRESULT.


Question 47 :

What do you know about .NET assemblies?

Answer :

Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET Remoting applications.


Question 48 :

What's the difference between private and shared assembly?

Answer :

Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.


Question 49 :

What's a strong name?

Answer :

A strong name includes the name of the assembly, version number, culture identity, and a public key token.


Question 50 :

How can you tell the application to look for assemblies at the locations other than its own install?

Answer :

Use the
directive in the XML .config file for a given application.

<probing privatePath="c:\mylibs; bin\debug" /> 
should do the trick. Or you can add additional search paths in the Properties box of the deployed application.