Tải bản đầy đủ (.doc) (131 trang)

Question Bank Adv .Net and Security in .Net Project

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (469.18 KB, 131 trang )

Question Bank
Adv .Net and Security in .Net Project
1.

The Obsolete attribute, which is used to specify a method as obsolete,
is provided with the .NET framework.
a) True

2.

3.

5.

6.

Attributes

7.

[0.5]

b) DllImport

When a program is compiled into a release version, it has fewer
overheads and also executes faster compared to a debug version.
a) True

[0.5]

b) Properties



C# provides the _______ attribute for interoperability with Windows
DLLs.
a) Conditional

[0.5]

b) False

______ are used in C# to add MetaData to classes and assemblies.
a)

[0.5]

b) .PDB

In .NET, a dynamic link library is created by default when a project of
type console application is built.
a) True

[0.5]

b) False

When a program is compiled in debug mode, a file with an extension
_______ is created.
a) .DBP

4.


b) False

The Conditional attribute enables access to the Win32 API.
a) True

[0.5]

b) False

[0.5]


8.

Windows DLLs have deployment problems like registering the DLL in [0.5]
the Windows registry and versioning issues.
a) True

9.

The code residing inside the Windows Dll is known as _________ [0.5]
code as it has direct access to the memory.
a) Managed

10.

True

b) False


DllImport

True

[0.5]

b) Conditional

An attribute in C# is a declarative tag, which can be used to provide
information to the runtime about the behaviour of the C# elements
such as classes only.
a)

14.

b) only at the beginning of

The _________ attribute is used to conditionally prevent or allow
execution of a block of code.
a)

13.

[0.5]

The Win32 API consists of a set of dlls that contain the necessary [0.5]
methods for invoking the system calls.
a)

12.


b) Unmanaged

Symbol definition should occur ____________ the program.
a) anywhere in

11.

b) False

[1.0]

b) False

Statement 1: An obsolete method executes as any normal method.
[1.0]
Statement 2: Specifying a method as obsolete makes the C# compiler
generate an error when the program is compiled.
a) Statement 1 is true

c) Statement 2 is true

b) Statement 1 is false

d) Statement 2 is false


15.

Which of the following are the steps involved in creating an attribute?


[1.0]

a) Enclose the attribute in square c) Multiple attributes for a single
brackets.
method can be specified by
specifying them one after
another just before the
method name or class
element they apply to.
b) Pass
any
number
of d) All of the above.
parameters required to the
attribute within parenthesis.
16.

Which of the following is true?

[1.0]

a) The DllImport attribute is used
to interoperate with code in
unmanaged and legacy
components.

c) The methods contained
within Windows DLLs can be
called within C# programs

using the DllImport attribute.

b) The unmanaged code is the
code that has been generated
outside the .NET environment.

d) All of the above.

17. Which namespace has to be imported in applications for working with [1.0]
legacy code?
a) System.Runtime.Services
b) System.InteropServices

18.

c) System.Services
d) System.Runtime.InteropService
s

Which of the following is true when the first parameter passed to [1.0]
AttributeUsage attribute is AttributeTargets.All enumerator?
a) The attribute can be applied
to any class element.

c) The attribute can be applied
only to Enums.

b) The attribute can be applied
only to constructors.


d) The attribute can be applied
only to Modules.


19.

Which of the following is true when the first parameter passed to [1.0]
AttributeUsage attribute is AttributeTargets.Constructor enumerator?
a) The attribute can be applied to
any class element.
b) The attribute can be applied
only to constructors.

20.

c) The attribute can be applied
only to Enums.
d) The attribute can be applied
only to Modules.

Which of the following is true when the first parameter passed to [1.0]
AttributeUsage attribute is AttributeTargets.Module enumerator?
a) The attribute can be applied to
any class element.
b) The attribute can be applied
only to constructors.

21.

c) The attribute can be applied

only to Enums.
d) The attribute can be
applied only to Modules.

Statement 1: The AllowMultiple property for the AttributeUsage
[1.0]
attribute indicates whether the attribute may be applied to the same
item more than once.
Statement 2: The Inherited property for the AttributeUsage attribute
indicates whether the attribute applied to a certain class or interface
applies to all inherited classes or interfaces.
a) Statement 1 is true
b) Statement 1 is false

22.

c) Statement 2 is true
d) Statement 2 is false

Which of the following is/are true regarding the AttributeUsage
attribute?
a) If the Inherited property is
set to true, the attribute
applied to a certain class or
interface will be applied to
all inherited classes or
interfaces.

c) If the AllowMultiple
property is set to false, the

compiler will generate an
error if the attribute is
applied to the same item
more than once.

b) If the Inherited property is set
to false, the attribute applied to

d) If the AllowMultiple property
is set to true, the compiler

[1.0]


a certain class or interface will
be applied to all inherited
classes or interfaces.
23.

will generate an error if the
attribute is applied to the
same item more than once.

Statement 1: To read MetaData from a .NET component, the assembly [1.0]
is first loaded into the running process.
Statement 2: Assembly.Load(assemblyName) is a static member
method of the Assembly namespace.
a) Statement 1 is true
b) Statement 1 is false


24.

c) Statement 2 is true
d) Statement 2 is false

Which of the following is/are true?
a) The .NET components expose
their MetaData through a
process known as Reflection.

[1.0]
c) The classes necessary for
Reflection can be found in
the Namespace
System.Reflection.

b) Reflection covers the
d) All of the above.
various .NET base classes
allowing finding out information
about the types in programs or
assemblies.
25.

Which of the following is/are true in relation with the features of [1.5]
Assemblies?
a) As assemblies are SelfDescribing, they do not
require registry keys.

d) The installation of one

application does have
adverse effects on the other
applications.

b) Due to Versioning, each
assembly file reflects or
rather exposes the version
number to all .NET
applications.

e) All of the above.

c) Installation of applications
are as simple as copying the
files from one directory to


another.
26.

Consider the snippet given below:

[1.5]

static void Main(string[] args)
{
Assembly asm = Assembly.Load("AttrEx");
Type ty =asm.GetType();
Attribute[] atb=Attribute.GetCustomAttributes(ty);
Object ob = atb[0];

Console.WriteLine("The attribute value is :" + ob.ToString());
Which of the following is/are true?
a) The code above will give a
compile time error.
b) The code above will display
the parameter value passed
to attribute existing in the
class AttrEx on console.
27.

c) The code above will give a
run time error.
d) None of the above.

Consider the snippet below:

[1.5]

public class CoderAttribute : Attribute
{
private string cname;
public CoderAttribute(string cName)
{
this.cname =cName;
}
}
Which of the following is/are true regarding the snippet?
a) It is mandatory for
CoderAttribute class to
inherit the Attribute class.


c) It is not necessary for the
CoderAttribute class to have
a constructor defined within
it.

b) Attribute class belongs to
the System namespace.

d) If the Coder attribute has a
single parameter of string


type, then the CoderAttribute
class can have a constructor
with any number of string
parameter.
28.

Consider the snippet given below.

[1.5]

[CoderAttribute(“Martin”)]
public void CalculateBonus
{
//Method Implementation
}
Which of the following is/are true?
a) The compiler appends the

string ‘Attribute’ to the name
CoderAttribute forming the
name CoderAttributeAttribute.
b) The compiler does not
append the string ‘Attribute’
to the name but leaves the
name as CoderAttribute.
29.

c) CoderAttribute is the only
custom attribute defined
for the method
CalculateBonus.
d) All of the above.

Which of the following snippet is correct for the class WriterAttribute [1.5]
with the attribute “Writer” that can be applied only to the properties?
a) [AttributeUsage(AttributeTargets.Method,
AllowMultiple=false,Inherited=false)]
public class WriterAttribute {
….
b) [AttributeUsage(AttributeTargets.Method |
AttributeTargets.Property, AllowMultiple=false,Inherited=false)]
public class WriterAttribute : Attribute{
….
c) [AttributeUsage(AttributeTargets.Method |
AttributeTargets.Property,AllowMultiple=false,
Inherited=false)]
public class WriterAttribute {
....

d) [AttributeUsage(AttributeTargets. Property,


AllowMultiple=false,Inherited=false)]
public class WriterAttribute : Attribute{
….
30.

Which of the following is the correct syntax, if there are two attributes [1.5]
associated with a method?
a) …
[AttributeName1,AttributeName2](Parameters)
MethodName(Parameters)
[
//Method Implementation
]
[AttributeName1(Parameters)]
b) …
[AttributeName1(Parameters),
AttributeName2(Parameters)]
MethodName(Parameters)
[
//Method Implementation
]
c) …
[AttributeName1(Parameters)]
[AttributeName2(Parameters)]
MethodName(Parameters)
[
//Method Implementation

]
d) …
MethodName(AttributeName1(Parameters)
AttributeName2(Parameters))
[
//Method Implementation
]

31.

Which of the following is/are true?
a)

A .NET component is a

[1.5]
d)

The CLR can only execute


piece of executable code
referred to as Assemblies.
b)

c)

32.

An assembly is a collection

of all information required
by the runtime to execute
an application.

code in assemblies.
e)

All of the above.

An assembly can be only a
DLL file.

Consider the snippet below:

[1.5]

[DllImport("Calculation.dll")]
public static extern int Addition(int a, int b);
static void Main(string[] args) {
int ans = Addition(5,2);
Console.WriteLine("Result : {0}",ans);
Console.ReadLine();
}
Which of the following is/are true?
a) Windows DLL named
d) The Addition method,
Calculation.dll must exist either
imported from the
in the application directory or
Calculation.dll, takes in two

System32 folder inside the
integer parameters and
Windows installation directory.
returns the result as an
integer.
b) The DLL to import is passed
as the parameter to the
DllImport attribute.

e) The extern keyword in the
declaration of imported
method is necessary for
using any external methods
residing in Dlls.

c) All of the above.
33.

Which of the following is/are true?
a) An assembly that has been d) The assembly
compiled into a PE file has
versioning and
an extension of .exe.
permissions.

[1.5]
handles
security



b) The *.exe file in .NET e) All of the above.
Framework is the same as a
standalone executable created
by a C++ compiler.
c) The PE assembly consists of
code in the form of IL that
requires the .NET platform to
be installed on the system in
order to execute.
34.

Consider the snippet below:

[1.5]

[Conditional("DEBUG")]
public static void Msg(string message){
Console.WriteLine(message);
}
static void Main(string[] args){
Console.WriteLine("Before calling
Msg()");
Msg("Working with Attributes");
Console.ReadLine();
}
Which of the following is/are true?
a) The Conditional attribute
marking the Msg() method
ensures that the Msg()
method will be used only in

debug versions of the
solution.

d) The compiler will not
generate an error if the
method Msg() does not
return a void.

b) The calls to the Msg()
method from anywhere in
the code in the release
version will not be
entertained.

e) All of the above.

c) The Msg() method is not called
in the Release version, but
compile time errors are thrown.


35.

Which of the following is/are true regarding the conditional attribute?
a) It can only be applied to a
complete method as a unit.

[2.0]

c) If the condition is met, the

compiler ignores any lines
of code anywhere else in
the source file that calls up
the method.

b) If the condition is not met,
d) It cannot be applied to a
the compiler will not compile
complete method as only a
the code for the method.
unit.
36.

Statement 1: Attributes are translated into statements in the compiled
code.
Statement 2: Attributes serve as directives to the compiler.
a) Statement 1 is true

37.

c) Statement 2 is true

b) Statement 1 is false

d) Statement 2 is false

Statement 1: Attributes can also be applied to individual arguments of
[2.0]
a method.
Statement 2: Attribute name can be declared anywhere with respect to

the definition of the item in the code.
a) Statement 1 is true

c) Statement 2 is true

b) Statement 1 is false
38.

[2.0]

d) Statement 2 is false

Which of the following statements is/are true regarding the attribute
DllImport?
Statement 1: It is used to mark a method as being defined in an
external Dll rather than in any assembly.
Statement 2: It is used to mark a method as being defined in any
assembly.
a)

Statement 1 is true

c) Statement 2 is true

b)

Statement 1 is false

d) Statement 2 is false


[2.0]


39.

Which of the following is/are true regarding the Conditional attribute?

[2.0]

a) Any method that returns a d) It is used to mark a method
void can be marked with it.
as being defined in an
external Dll.
b) It is used to give conditional e) All of the above.
compilation.
c) It can be used for debug
builds.
40.

Which of the following is/are true regarding Reflection?
[2.0]
Statement 1: It allows finding out information about the types in
programs or assemblies.
Statement 2: It can be used to read meta data from assembly
manifests.
a) Statement 1 is true
b) Statement 1 is false

41.


c) Statement 2 is true
d) Statement 2 is false

Which of the following is/are true?
[2.0]
Statement 1: The Assembly class allows access to the metadata for a
given assembly.
Statement 2: The Assembly class provides methods to allow execute
an assembly, which is an executable file.
a) Statement 1 is true
b) Statement 1 is false

42.

c) Statement 2 is true
d) Statement 2 is false

Which of the methods is/are used to load the corresponding assembly [2.0]
into the running process?
a) Assembly.AssemblyLoad()
b) Assembly.OnLoad()

43.

c) Assembly.Load()
d) Assembly.LoadFrom()

Consider the snippet given below:

[2.5]



#define DEBUG


[Conditional(“DEBUG”)]
[Obsolete()]
public static void DisplayMessage(){
Console.WriteLine(“Hello”);
}
Which of the following
DisplayMessage()?

is/are

true

regarding

the

method

a) The above method runs if a
debug build takes place.
b) It is an obsolete method.

44.

c) It gives error during

compilation.
d) On using the method the
compiler generates a
warning.

Consider the snippet given below:

[2.5]


class ExClass
{
[Conditional(“Using42.dll”)]
public static extern int MessageBox(int hparent, string
Message, string caption, int type);
}
Which of the following is/are true?
a) The code above generates
an error.

b) The code above compiles
successfully.

45.

c) The code above must have
DllImport attribute to make
use of the windows API
function MessageBox.
d) The MessageBox() API

function is defined in
Using42.dll.

Which of the following is/are true regarding the windows API function
MessageBox()?

[2.5]


a) While using the DllImport
attribute, the declaration of the
method MessageBox must
contain the keyword extern.

d) The fourth parameter of the
method if set to 0, ensures
that the message box has a
button OK.

b) The second parameter of the
method indicates a string or
message to be displayed.

e) All of the above

c) The third parameter of the
method indicates a caption to
be displayed in title bar.
46. Which of the following is/are true?


[2.5]

a) The Assembly.GetTypes()
returns an array of type
System.Type containing objects
that contain the details of all the
types defined in the assembly.

d) The
Assembly.GetAttributes()
is used to get the custom
attributes attached to an
assembly .

b) The Assembly.GetTypes() is used
to return an array of System.Type
references that contains details of
only one type.

e) All of the above.

c) The
Assembly.GetCustomAttributes(
) is used to get the custom
attributes attached to an
assembly .
47.

Which of the following is/are true?


[2.5]

a) AttributeUsage is primarily
c) An attribute applied to an
used to indicate the items
assembly can be placed
that the custom attribute can
anywhere in the code but
be applied to.
need not be marked with the
keyword assembly.
b) An attribute can be applied
to an assembly as a whole

d) An attribute applied to an
assembly can be placed


instead of to an element in
the code.

48.

anywhere in the code but
must be marked with the
keyword assembly.

Which of the following is/are true?

[2.5]


a) Assemblies include metadata
such as the types exported
from the assembly and a
manifest.
b) The version of a referenced
assembly is stored in the
manifest of the assembly.
49.

c) .NET allows different
versions of the same
assembly to be used in a
single process.
d) All of the above.

Statement 1: Application Domains allow applications to run
[2.5]
independently inside a single process.
Statement 2: Application Domains do not allow applications to run
independently inside a single process.
a) Statement 1 is true
b) Statement 1 is false

50.

c) Statement 2 is true
d) Statement 2 is false

Statement 1: Private assemblies require registration and versioning.

[2.5]
Statement 2: Private assemblies can have versioning problems, which
need to be addressed during development time.
Statement 3: Windows 2000 introduced the side-by-side feature that
allows different versions of the same DLL to be used on a system.
a) Only statements 1 and 2 are c) Only statements 2 and 3
true.
are true.
b) Only statements 1 and 3 are d) None
of
the
true.
statements is true.

51.

above

An assembly can exist completely within a single file or can span [0.5]
across multiple files.
a)

True

b) False


52.

The .NET metadata is a collection of information existing in [0.5]

___________ form inside a Portable Executable file.
a)

53.

Hexadecimal

In Global Assembly Cache, two assemblies with the same name but [0.5]
different versions can exist.
a) True

54.

b) False
[0.5]

b) False

The _________ utility comes along with the .NET framework SDK. [0.5]
This utility is used to create resource files.
a) Resgenerate.exe

59.

b) .NET Packages

A Resource file is a collection of resources like images and sounds.
a) True

58.


[0.5]

Splitting the code across various modules enables the .NET cross [0.5]
language support.
a) True

57.

b) MSIL

The files that contain only IL code are known as ___________.
a) .NET Modules

56.

b) False

The .NET compilers compile the source code into an Intermediate [0.5]
Language called _______.
a) SMIL

55.

b) Binary

b) Resgen.exe

The Image class belongs to the __________ namespace.


[0.5]


a) System.Drawing
60.

A cache is used for storing information __________
a) Permanently

61.

63.

[0.5]

b) Directory

Private assemblies are the default type of assemblies.
a) True

[0.5]

b) Temporarily

Global Assembly Cache is a ________.
a) File

62.

b) System


[0.5]

b) False

Which of the following is/are the part(s) of an assembly?
a) Assembly Metadata

d) Resources

b) Type Metadata

[1.0]

e) All of the above

c) MSIL Code
64.

Statement 1: Version numbers for an assembly are set in the
[1.0]
Asembly.cs file that accompanies the project.
Statement 2: The ILDASM tool can be used to view the assembly
version number being written into the assembly manifest.
a) Statement 1 is true
b) Statement 1 is false

65.

c) Statement 2 is true

d) Statement 2 is false

Which of the following can be found in an assembly version number?
a) Majority

c) Revision

[1.0]


b) Minority
66.

d) Build

Statement 1: Strong or unique name must be generated for each and
every shared assembly created.
Statement 2: In case of a shared assembly, the assembly file is copied
into the applications directory.
a) Statement 1 is true

67.

c) Statement 2 is true

b) Statement 1 is false

[1.0]

d) Statement 2 is false


Which of the following is/are true?

[1.0]

a) The gacutil.exe can be used c) The gacutil.exe can be
to install and uninstall
used to list assemblies on
assemblies from the GAC
the
GAC
using
the
using the command line.
command line.
b) Private assemblies can be d) All of the above.
shared
across
different
applications.
68.

Which of the following is/are true?

[1.0]

a) The GAC is a cache for c) GAC
physically
is
Assemblies.

directory or a folder.

a

b) Private assemblies need to be d) All of the above.
stored in GAC.
69.

Which of the command line options is used to get information [1.0]
regarding the assemblies residing in the native image cache?
a) /view

c) /show

b) /display

d) /open


70.

Which of the following methods in System.Reflection.Assembly
class is used to get the resource names?
a) GetManifestResourceNames(
)

71.

c) GetResources()


b) GetResourceNames()

d) GetManifestNames()

Statement 1: The return type for the GetObject() method is Object.
Statement 2: The return type for the GetObject() method is Int32.
a) Statement 1 is true

[1.0]

c) Statement 2 is true

b) Statement 1 is false
72.

[1.0]

d) Statement 2 is false

Which of the following is/are true?
a) ResourceWriter class
belongs to the
System.Resources
namespace.

[1.0]
c) The
method
AddResource() is used to
add a resource.


b) ResourceWriter class allows d) ResourceWriter class allows
resources up to 4 Gigabytes.
adding only pictures files to
an assembly.
73.

Consider the syntax of resgen utility below:

[1.0]

Resgen sub.txt sub.resX
Which of the following is/are true?
a) It creates
sub.resX.

a

file

b) It creates HTML-based
resource files.
74.

called d) It creates a
sub.resources.

file

called


e) It
creates
XML-based
resource files.

Statement 1: Modules written in different languages like C#, VB.NET
and JScript.NET can be clubbed into a single assembly.

[1.0]


Statement 2: Modules written in different languages such as C#,
VB.NET and JScript.NET cannot be clubbed into a single assembly.
a) Statement 1 is true
b) Statement 1 is false
75.

c) Statement 2 is true
d) Statement 2 is false

Which of the following is/are true regarding the assembly version [1.5]
number?
a) Change in the major number d) Change
in
the
build
indicates that the assembly
number indicates that a
is incompatible with the

very minor change has
previous versions of that
been
made
to
the
assembly.
assembly.
b) Change in the minor number e) All of the above
indicates that the assembly is
compatible with the previous
versions of that assembly.
c) Change in the revision
number indicates that the
assembly maybe compatible
with previous versions of
that assembly.

76.

Which of the following is/are true?

[1.5]

a) Resources can exist either d) The .NET modules contain
as part of the .NET assembly
the Type Metadata only.
or as a separate file.
b) The .NET modules contain e) The MSIL code can exist in
the Type Metadata and the IL

separate files.
code.
c) Assembly Metadata is stored
in a module.
77.

Which of the following is the functionality of the /upre option of GACUtil
utility?

[1.5]


a) Lists the assemblies from the c) Uninstalls
the
specified
GAC
assembly on the GAC
b) Installs the specified assembly d) Uninstalls the assembly
on the GAC
from the native image
cache
78.

Which of the following is/are true?

[1.5]

a) Modules
can
contain d) A web browser can get the

manifests but no assembly
repeatedly requested data
metadata
inside
the
from the cache rather than
manifest.
the original server.
b) It is possible to version a e) Due to cache, network traffic
module.
increases.
c) A cache is used for
temporarily
storing
frequently used information.
79.

Consider the snippet given below:
ResourceWriter rw = new ResourceWriter("sub.resources");
using(Image img = Image.FromFile("face.jpg"))
{
rw.AddResource("Picture", img);
rw.AddResource("Description", "My face”);
rw.Close();
}
Which of the following is/are true?
a) An instance of Image class is d) FileNotFound exception is
created in a using statement.
thrown if the image file
face.jpg is not present in the

applications directory.
b) The object img of the Image e) All of the above.
class will be disposed once the
execution reaches the end of
the using construct.

[1.5]


c) If the file sub.resources does
not exist, an exception is
generated.
80.

Consider the code below that uses the namespace Ex2 with the [1.5]
resource file sub.
Assembly ass = Assembly.GetExecutingAssembly();
ResourceManager resman=new ResourceManager("Ex2.sub",
ass);
PictureBox1.Image = (Image)resman.GetObject("Picture");
label1.Text = resman.GetString("Description");
Which of the following is/are true?
a) An object ass of type d) Error is generated due to the
Assembly is declared to
wrong syntax of instantiating
hold the reference to the
a ResourceManager object.
executing assembly.
b) System.Resources
namespace has to be

imported.

e) All of the above.

c) Text property of the Label
label1 is set with the value
referred
by
the
key
Description
in
the
corresponding resource file.
81.

Which of the following is/are true?
a) There is a need to make an d) The sn.exe makes use of
assembly a shared assembly
various cryptographic or
to use it in more than one
encryption algorithms.
application.
b) Shared assembly must not e) All of the above.
have naming clashes with
other assemblies.
c) The sn.exe is the utility to

[1.5]



make a unique identifier
across the entire system for
shared assembly.
82.

Which of the following is the functionality of the /i option of GACUtil
utility?

[1.5]

a) Lists the assemblies from the c) Uninstalls
the
specified
GAC.
assembly on the GAC.
b) Installs
the
specified d) Uninstalls the assembly from
assembly on the GAC.
the native image cache.
83.

Which of the following is/are true?

[1.5]

a) The Global Assembly Cache is d) Ngen.exe utility is used to
a part of Native Image Cache.
install an assembly onto

the Native Image Cache.
b) The Native Image Cache e) All of the above.
stores assemblies in their
native machine independent
native code.
c) GAC stores assemblies in IL
format.
84.

Which of the following is the functionality of the /u option of GACUtil [1.5]
utility?
a) Lists the assemblies from the c) Uninstalls the specified
GAC.
assembly from the GAC.
b) Installs the specified assembly d) Uninstalls the assembly from
on the GAC.
the native image cache.

85.

Which of the following is/are the part(s) of manifest of an assembly?
a) A
list
of
assemblies.

referenced d) Exported types included from
a module.

[2.0]



b) A set of permission requests.

e) All of the above.

c) A list of files belonging to this
assembly.
86.

Statement 1: The reflection mechanism can use the information about
[2.0]
the exported types for late binding to classes.
Statement 2: Type-library can be easily generated out of manifest for
the use of COM clients.
a) Statement 1 is true

Statement 2 is true

b) Statement 1 is false
87.

c)
d)

Statement 2 is false

Which of the following is/are true regarding modules?
a)


They are only loaded when d) They can be used for slower
needed.
startup of assemblies.

b)

They are DLLs without e) All of the above.
assembly attributes.

c)

[2.0]

Usually they do not have
assembly metadata and
have no version information
present within it.

88. Which of the following namespaces has/have classes that can be used
for the assembly attributes arguments?
a) System.Reflection

[2.0]

c) System.Reflection.InteropServices

b) System.Runtime.Compiler d) System.Runtime.InteropService
Services
s
89.


Statement 1: An assembly can use a resource, not embedded within a
DLL file, by referencing through assembly metadata.
Statement 2: An assembly metadata can be used to reference a
.netmodule file.

[2.0]


a) Statement 1 is true
b) Statement 1 is false
90.

c) Statement 2 is true
d) Statement 2 is false

Which of the following is/are true?

[2.0]

a) The attribute, [assembly] is c)
a global attribute.
b) The attribute, [import] is a d)
global attribute.

91.

The attribute, [module] is a
global attribute.
Global attributes are not

attached to a specific
language element.

Which of the following is/are true?

[2.0]

a)

b)

92.

Manifest must contain list of c) A single assembly can
files
belonging
to
an
contain any number of files.
assembly.
A single assembly must have d) All of the above.
at least one file.

Statement 1: Manifest is a part of metadata that describes the
assembly with all information needed to reference it.
Statement 2: Manifest consists of identity name, culture and version
but no public key.
a) Statement 1 is true

93.


c) Statement 2 is true

b) Statement 1 is false

[2.0]

d) Statement 2 is false

Which of the following is/are true regarding integrity using strong [2.5]
names of .NET assemblies?
a)

When creating a shared d) The strong name utility
component, a public /private
generates a public/private
key pair must be used.
key pair.

b)

The private key is stored e) All of the above.
within the assembly.


×