© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu

Home Placements Interview Questions Dot Net Interview Questions And Answers Page2▼

Dot Net Interview Questions And Answers

19. What is a Manifest in .NET?

An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. The following table shows the information contained in the assembly manifest. The first four items the assembly name, version number, culture, and strong name information make up the assembly's identity.
Assembly name: A text string specifying the assembly's name.

Version number: A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy.

Culture: Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing culture- or language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.) Strong name information: The public key from the publisher if the assembly has been given a strong name. List of all files in the assembly:

20. How to Create a Key Pair in .NET?

You can create a key pair using the Strong Name tool (Sn.exe). Key pair files usually have an .snk extension. To create a key pair At the command prompt, type the following command:

sn k
In this command, file name is the name of the output file containing the key pair. The following example creates a key pair called sgKey.snk.
sn -k sgKey.snk

21. What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

When u compile a program using command line, u add the references using /r switch. When you compile a program using Visual Studio, it adds those references to our assembly, which are added using "Add Reference" dialog box. While "using" statement facilitates us to use classes without using their fully qualified names.

For example: if u have added a reference to "System.Data.SqlClient" using "Add Reference" dialog box then u can use SqlConnection class like this:

System.Data.SqlClient.SqlConnection

But if u add a "using System.Data.SqlClient" statement at the start of ur code then u can directly use SqlConnection class.
On the other hand if u add a reference using "using System.Data.SqlClient" statement, but don't add it using "Add Reference" dialog box, Visual Studio will give error message while we compile the program.

Previous Next
1 2 3 4 5 6 7 8 9 10
SLogix Student Projects
bottom