.NET midterm question

Beschreibung

Component based programming .NET midterm quiz
BigDady313 .
Quiz von BigDady313 ., aktualisiert more than 1 year ago
BigDady313 .
Erstellt von BigDady313 . vor fast 8 Jahre
45
0

Zusammenfassung der Ressource

Frage 1

Frage
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?
Antworten
  • 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

Frage 2

Frage
What is the default file name extension of a .NET class library?
Antworten
  • .exe
  • .net
  • .lib
  • .cs
  • .dll

Frage 3

Frage
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?
Antworten
  • 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

Frage 4

Frage
Which of the following C# project templates in Visual Studio should be used to construct the PaymentCard service from Lab 1?
Antworten
  • Class Library
  • WPF Application
  • Console Application
  • Windows Service

Frage 5

Frage
A reasonable conclusion that can be drawn after completing the Payment Card lab is that:
Antworten
  • 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

Frage 6

Frage
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?
Antworten
  • 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

Frage 7

Frage
Where does the CLR normally expect to find a private class library assembly that is required by a client assembly?
Antworten
  • 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

Frage 8

Frage
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!)
Antworten
  • 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

Frage 9

Frage
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?
Antworten
  • Lab3Library.dll.config
  • App.config
  • Lab3Library.config
  • Lab3Client.config
  • Lab3Client.exe.config

Frage 10

Frage
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
Antworten
  • True
  • False

Frage 11

Frage
Which is the correct Visual Studio command-line to install an assembly called library.dll into the Global Assembly Cache?
Antworten
  • gacutil -i library
  • gacutil -u library.dll
  • gacutil -i library.dll
  • gacutil -u library
  • gacutil library

Frage 12

Frage
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?
Antworten
  • True
  • False

Frage 13

Frage
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?
Antworten
  • codeBase
  • assemblyIdentity
  • assemblyBinding
  • bindingRedirect
  • probing

Frage 14

Frage
Which kind of .NET assembly can be shared in the Global Assembly Cache (GAC)?
Antworten
  • 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)

Frage 15

Frage
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?
Antworten
  • assemblyIdentity
  • codeBase
  • bindingRedirect
  • probing
  • assemblyBinding

Frage 16

Frage
Which clients are impacted by a publisher's policy?
Antworten
  • 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

Frage 17

Frage
What kind of file is a publisher's policy deployed as?
Antworten
  • A signed Windows executable assembly
  • A signed class library assembly
  • An xml-based text file
  • A private, unsigned class library assembly

Frage 18

Frage
Which Visual Studio utility program is used to generate a publisher's policy from an XML format config file?
Antworten
  • al (al.exe)
  • ildasm (ildasm.ee)
  • sn (sn.exe)
  • gacutil (gacutil.exe)

Frage 19

Frage
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?
Antworten
  • policy.2.0.PhysicsLib
  • policy.1.0.PhysicsLib
  • pubpol.PhysicsLib.1.0
  • policy.9abc54cf85be28fe.PhysicsLib
  • No particular file name

Frage 20

Frage
Which of the following is not an aspect of assembly binding that can be controlled by a publisher's policy?
Antworten
  • 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

Frage 21

Frage
What kind of thing is a Runtime Callable Wrapper (RCW)?
Antworten
  • 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

Frage 22

Frage
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?
Antworten
  • 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

Frage 23

Frage
What kind of file is a COM Callable Wrapper (CCW)?
Antworten
  • 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

Frage 24

Frage
A Runtime Callable Wrapper (RCW) is used to:
Antworten
  • 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)

Frage 25

Frage
A COM Callable Wrapper (CCW) is used to:
Antworten
  • 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
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Historical Development of Computer Languages
Shannon Anderson-Rush
Useful String Methods
Shannon Anderson-Rush
Flvs foundations of programming dba 2
mariaha vassar
Introduction to Programming: C#
Isaiah Parker
Python Quiz
karljmurphy
computer systems and programming quiz
Molly Batch
Think Python
tsilvo2001
C Programming
Miki Rana
Generations of Programming Languages
Balikkoftesi
Mapa Conceptual - Arreglos
ciroivan94