BigDady313 .
Quiz by , created more than 1 year ago

Component based programming .NET midterm quiz

45
0
0
BigDady313 .
Created by BigDady313 . almost 8 years ago
Close

.NET midterm question

Question 1 of 25

1

Assume there is a private .NET class library and client executable. Which is the correct way to test the client to see if it will interoperate with the class library?

Select one of the following:

  • Use the .NET assembly linker tool to generate one combined assembly based on both the client and the class library, then execute this combined assembly

  • Put the client and the library in the same folder and execute the class library file

  • Put the client and the library in the same folder and execute the client file

  • Combined all the source code for the client and class library into one Visual Studio project then build and execute the project

Explanation

Question 2 of 25

1

What is the default file name extension of a .NET class library?

Select one of the following:

  • .exe

  • .net

  • .lib

  • .cs

  • .dll

Explanation

Question 3 of 25

1

When developing a .NET application in Visual Studio, which one of the following is a correct way to establish a client-service relationship between a client project and a class library project?

Select one of the following:

  • Add a reference to the client assembly within the class library project

  • Add a reference to the class library assembly within the client project

  • Add using namespace statement for the class library's namespace within the client project

  • Add a using namespace statement for the client's namespace within the class library project

Explanation

Question 4 of 25

1

Which of the following C# project templates in Visual Studio should be used to construct the PaymentCard service from Lab 1?

Select one of the following:

  • Class Library

  • WPF Application

  • Console Application

  • Windows Service

Explanation

Question 5 of 25

1

A reasonable conclusion that can be drawn after completing the Payment Card lab is that:

Select one of the following:

  • A software component interface, like ICard, must remain immutable or unchanging to allow different implementations to be supported

  • A component software architecture should be the default or standard approach when developing any software system

  • A class library project in Visual Studio is a suitable tool for creating a client application such as the PaymentCard client

  • An application's performance can be improved by separating it into multiple software components like the PaymentCard client and library

Explanation

Question 6 of 25

1

The CLR can be advised to bind to a private class library in non-default location using the probing element in an Application Configuration File. Which of the following is a key limitation of this technique?

Select one of the following:

  • The class library must be located outside the folder in which the client assembly is located.

  • Both the client and class library assembly must be developed using the same .NET language (e.g. both written in C#)

  • The class library must be located in a subfolder within the folder in which the client assembly is located

  • The class library's version number must match the version number expected by the client

Explanation

Question 7 of 25

1

Where does the CLR normally expect to find a private class library assembly that is required by a client assembly?

Select one of the following:

  • In the Global Assembly Cache

  • In the same folder as the client assembly

  • In a subfolder called libs located within the client assembly's folder

  • In the Windows\System32 folder

Explanation

Question 8 of 25

1

If you have a class library project in Visual Studio, what effect will be created by assigning it an assembly version number of 10* (Yes, the last number is blank!)

Select one of the following:

  • This will assign a version number that does not include a revision number or a build number

  • This will cause a builder error

  • Visual Studio will automatically assign a build number to the assembly

  • Visual Studio will automatically assign both a revision number and a build number to the assembly

Explanation

Question 9 of 25

1

If a client assembly called Lab3Client.exe uses a class library assembly called Lab3Library.dll, what is the correct name of the application configuration file if the application is deployed with one?

Select one of the following:

  • Lab3Library.dll.config

  • App.config

  • Lab3Library.config

  • Lab3Client.config

  • Lab3Client.exe.config

Explanation

Question 10 of 25

1

True of False: If a .NET client is designed to use a private (unsigned) class library having an assembly version of 1.0.0.0 but instead an otherwise identical class library is provided with a different version number, the application will still work

Select one of the following:

  • True
  • False

Explanation

Question 11 of 25

1

Which is the correct Visual Studio command-line to install an assembly called library.dll into the Global Assembly Cache?

Select one of the following:

  • gacutil -i library

  • gacutil -u library.dll

  • gacutil -i library.dll

  • gacutil -u library

  • gacutil library

Explanation

Question 12 of 25

1

A .NET client is designed to use a signed class library having an assembly version of 1.0.0.0. However an otherwise identical class library with the assembly version number 1.0.1.0 is available instead.
This application will still work without configuring it via an application configuration file:
True or False?

Select one of the following:

  • True
  • False

Explanation

Question 13 of 25

1

A developer wants to deploy a signed class library assembly that is a newer version of the one the client already references. Which element of the client's application configuration file can be used to configure this?

Select one of the following:

  • codeBase

  • assemblyIdentity

  • assemblyBinding

  • bindingRedirect

  • probing

Explanation

Question 14 of 25

1

Which kind of .NET assembly can be shared in the Global Assembly Cache (GAC)?

Select one of the following:

  • Any assembly

  • Any signed Windows application assembly (.exe extension)

  • Any signed class library assembly (.dll extension)

  • Any class library assembly (.dll extension)

  • Any Windows application assembly (.exe extension)

Explanation

Question 15 of 25

1

A developer wants to deploy a signed class library assembly's in a "non-default" location (i.e. not a location where the CLR would normally look for it). Which element of the client's application configuration file can be used to configure this?

Select one of the following:

  • assemblyIdentity

  • codeBase

  • bindingRedirect

  • probing

  • assemblyBinding

Explanation

Question 16 of 25

1

Which clients are impacted by a publisher's policy?

Select one of the following:

  • Any client installed in the Global Assembly Cache (GAC)

  • Any client of the corresponding class library that has an application configuration file that "points to" the publisher's policy

  • All clients of the corresponding class library on the computer

  • Always just one client that is in the same folder as the policy

Explanation

Question 17 of 25

1

What kind of file is a publisher's policy deployed as?

Select one of the following:

  • A signed Windows executable assembly

  • A signed class library assembly

  • An xml-based text file

  • A private, unsigned class library assembly

Explanation

Question 18 of 25

1

Which Visual Studio utility program is used to generate a publisher's policy from an XML format config file?

Select one of the following:

  • al (al.exe)

  • ildasm (ildasm.ee)

  • sn (sn.exe)

  • gacutil (gacutil.exe)

Explanation

Question 19 of 25

1

Given the following assembly information:

File Name = PhysicalLib.dll
Public Key Token = 9abc54cf85be28fe
Assembly Version = 2.0.1.5

What would be the correct name of a publisher's policy (file extension not included) for this assembly?

Select one of the following:

  • policy.2.0.PhysicsLib

  • policy.1.0.PhysicsLib

  • pubpol.PhysicsLib.1.0

  • policy.9abc54cf85be28fe.PhysicsLib

  • No particular file name

Explanation

Question 20 of 25

1

Which of the following is not an aspect of assembly binding that can be controlled by a publisher's policy?

Select one of the following:

  • Binding to an assembly with a different version number than the clients requests

  • Binding to an assembly with a different "friendly" name

  • Binding to the assembly in a non-default location

Explanation

Question 21 of 25

1

What kind of thing is a Runtime Callable Wrapper (RCW)?

Select one of the following:

  • A .NET assembly

  • A strong name key file with either the .snk or the .pfx extension

  • A COM Type ibrary with the .tlb file extension

  • An application configuration file with the .config file extension

Explanation

Question 22 of 25

1

When a COM library such as WordPlay.dll is deployed on a computer, what administrative task must be performed before the library will work with any client (managed or unmanaged) on that computer?

Select one of the following:

  • The library must be registered with the Windows System Registry

  • A COM Callable Wrapper (CCW) must be provided for the library

  • The library must be installed in the Global Assembly Cache (GAC)

  • A Runtime Callable Wrapper (RCW) must be provided for the library

Explanation

Question 23 of 25

1

What kind of file is a COM Callable Wrapper (CCW)?

Select one of the following:

  • An application configuration file with the .config file extension

  • A .NET assembly with the .exe file extension

  • A .NET assembly with the .dll file extension

  • A COM type library with the .tlb file extension

Explanation

Question 24 of 25

1

A Runtime Callable Wrapper (RCW) is used to:

Select one of the following:

  • enable a managed (.NET) component to work with an unmanaged client

  • enable an managed component to be assigned a strong name

  • enable a unmanaged (COM) component to work with an managed client

  • enable a managed (.NET) component to be shared in the Global Assembly Cache (GAC)

Explanation

Question 25 of 25

1

A COM Callable Wrapper (CCW) is used to:

Select one of the following:

  • enable a unmanaged (COM) component to work with an managed client

  • enable an unmanaged (COM) component to be assigned a strong name

  • enable an unmanaged (COM) component to be shared in the Global Assembly Cache (GAC)

  • enable a managed (.NET) component to work with an unmanaged client

Explanation