DotNet Framework Questions
DotNet Framework Questions
Choice 1
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Statement
Choice 1
Choice 2
The data and protocol are designed by the client and server on a case-by-case
basis.
Choice 3
Choice 4
Choice 5
Which one of the following statements must be true for the Common Language
Runtime to be able to completely isolate assemblies from each other?
Choice 1
All code must include XML comments on each public class member.
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Scenario
You are writing the Data Access Layer of your .NET Windows Forms application and
need to retrieve a connection string from your application configuration file.
Referring to the scenario above, which one of the following namespaces contains the
classes you use to retrieve application configuration file information through
managed code?
Choice 1
System.Reflection
Choice 2
System.Data
Choice 3
System.Configuration
Choice 4
System.Windows.Forms
Choice 5
System.Runtime
Record Answ er
Which one of the following objects is a high-level abstraction of the Connection and
Command objects in ADO.NET?
Choice 1
DataAdapter
Choice 2
DataView
Choice 3
DataTable
Choice 4
DataSet
Choice 5
DataReader
Record Answ er
Scenario
You are creating an ASP.NET Web application. You want each request to impersonate
a specific domain account for which you have set up SQL Server database
permissions.
Given the scenario above, which one of the following Web.Config elements is used to
set up the impersonation credentials for each request to your Web site?
Choice 1
<authorization>
Choice 2
<identity>
Choice 3
<appsettings>
Choice 4
<processmodel>
Choice 5
<authentication>
Record Answ er
Scenario
Mindy wants to use a .NET language that does NOT compile managed code by
default.
Given the scenario above, which one of the following languages does Mindy use?
Choice 1
JScript .NET
Choice 2
Choice 3
Choice 4
J#
Choice 5
C#
Record Answ er
Sample Code
VB.NET
<Assembly:AssemblyCultureAttribute("de")>
C#
[assembly:AssemblyCultureAttribute("de")]
Given the code sample above, what type of assembly does the code create?
Choice 1
Static
Choice 2
Dynamic
Choice 3
Strongly named
Choice 4
Satellite
Choice 5
Private
Record Answ er
Which one of the following choices is NOT a benefit of the .NET Framework CLR
(Common Language Runtime)?
Choice 1
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
All .NET Framework managed code runs within which one of the following?
Choice 1
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Scenario
Karin wants to deploy a .NET application in such a manner that its assemblies are
NOT made available to other .NET applications through the Global Assembly Cache
(GAC).
In the above scenario, which one of the following assembly types does Karin deploy?
Choice 1
A public assembly
Choice 2
A static assembly
Choice 3
A private assembly
Choice 4
A dynamic assembly
Choice 5
A global assembly
Record Answ er
Scenario
Your programming requirements dictate the use of a hash algorithm and you decide
to use the MD5 hash algorithm.
Referring to the scenario above, the abstract MD5 hash class is a member of which
one of the following namespaces?
Choice 1
System.Security.Policy
Choice 2
System.Xml
Choice 3
System.Security.SecurityElement
Choice 4
System.Text.Encoding
Choice 5
System.Security.Cryptography
Record Answ er
Scenario
John has created a database connection inside one of his managed code objects. He
wants to ensure that assemblies calling his managed object have the ability to
release this unmanaged resource as soon as possible.
Referring to the scenario above, what is the best way for John to accomplish this
while minimizing the amount of time that John's managed code object has the
database connection referenced?
Choice 1
Choice 2
Create a Dispose method and call it explicitly when he wants to release the
resource.
Choice 3
Choice 4
Choice 5
Create a finalize method and let the garbage collector execute it at collection time.
Record Answ er
Scenario
You have several legacy applications using older COM technology that need to
interact with a new business rule library that you have created as a .NET
assembly .dll, but you do not want all the public classes exposed to COM clients. You
know that this can be done using .NET COM Interop functionality.
Referring to the scenario above, which one of the following attributes do you use at
the class level to hide specific .NET classes from COM based application?
Choice 1
<ComImportAttribute>
Choice 2
<GuidAttribute>
Choice 3
<ClassInterfaceAttribute>
Choice 4
<ComVisibleAttribute>
Choice 5
<ComEventInterfaceAttribute>
Record Answ er
Which one of the following SecurityPermission enums must non type-safe code be
granted in order to run?
Choice 1
SkipVerification
Choice 2
NoFlags
Choice 3
ControlEvidence
Choice 4
Execution
Choice 5
Infrastructure
Record Answ er
Virtual
Choice 2
Sealed
Choice 3
Abstract
Choice 4
Static
Choice 5
InitOnly
Record Answ er
From which one of the following locations does the garbage collector remove
objects?
Choice 1
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
The .NET Framework significantly reduces the chance of buffer overrun security
vulnerabilities through its use of which one of the following design philosophies?
Choice 1
Choice 2
Choice 3
Managed Memory
Choice 4
Assembly Versioning
Choice 5
Record Answ er
Choice 2
The Assembly Linker (al.exe) generates native code from attributes in MSIL.
Choice 3
Choice 4
The class loader interprets the attribute into MSIL at load time.
Choice 5
Record Answ er
By default, code that is not type-safe is only allowed to run if it originates from
which one of the following locations?
Choice 1
Choice 2
A UNC path
Choice 3
The Internet
Choice 4
Choice 5
The intranet
Record Answ er
Scenario
Monique wants to create a class that has a public method that identifies the instance
type of the instantiated class.
Referring to the above scenario, what does Monique do when coding?
Choice 1
Choice 2
She does nothing; a GetType() method is implicitly inherited by all classes from
System.Object.
Choice 3
She overrides the GetType() method with code to return the type of the class she is
coding.
Choice 4
Choice 5
Record Answ er
Which one of the following .NET Class members provides functionality similar to a
Property but provides a parameter for accessing specific member instances?
Choice 1
Accessors
Choice 2
Operators
Choice 3
Structures
Choice 4
Events
Choice 5
Indexers
Record Answ er
Scenario
The .NET Framework provides infrastructure and base class libraries for
programming many different types of applications. One type of application it
provides for allows remote applications to easily communicate over HTTP through
Port 80 on corporate firewalls, using industry standard XML.
Referring to the scenario above, to which one of the following .NET Framework
technologies is this referring?
Choice 1
Choice 2
.NET Remoting
Choice 3
Choice 4
Choice 5
Record Answ er
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Scenario
You are trying to deploy your .NET web application to a production server. You know
that the .NET Framework is installed, but the Web site does not seem to have a
reference to the .NET Framework ISAPI .dll for .aspx pages in the configuration
section of the Web site.
Given the scenario above, which one of the following .NET Framework tools do you
use to register the Web site with the .NET Framework and make the appropriate
metabase entries?
Choice 1
Xsd.exe
Choice 2
Aspnet_regiis.exe
Choice 3
GacUtil.exe
Choice 4
NGen.exe
Choice 5
InstallUtil.exe
Record Answ er
.dll
Choice 2
.netmodule
Choice 3
.exe
Choice 4
.com
Choice 5
.bat
Record Answ er
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Which one of the following .NET Framework features automatically releases memory
for objects that are no longer referenced or have gone out of scope, eliminating a
great deal of bugs that used to arise from manual memory management?
Choice 1
Choice 2
Choice 3
Values Types
Choice 4
Choice 5
Record Answ er
Which one of the following .NET technologies is best used to communicate or pass
objects between application domains?
Choice 1
Choice 2
COM objects
Choice 3
ByVal objects
Choice 4
.NET Arrays
Choice 5
.NET Remoting
Record Answ er
Scenario
Michelle has a problem with her DataSet object. She needs to inspect the methods
and method signatures.
Given the scenario above, in which one of the following namespaces does Michelle
look?
Choice 1
System.Data.SqlClient
Choice 2
System.Ado
Choice 3
System.Data
Choice 4
System.Ado.Net
Choice 5
System.Xml
Record Answ er
Which one of the following statements is true with respect to the Common Language
Runtime (CLR)?
Choice 1
Choice 2
All .NET languages that use the CLR produce only CLS (Common Language
Specification) compliant code.
Choice 3
Choice 4
Code compiled in one .NET language can interact with code compiled in a
different .NET language.
Choice 5
Record Answ er
When using a multicast delegate, which one of the following statements is true?
Choice 1
Choice 2
Choice 3
The .BeginInvoke() method must be used to explicitly call the contained method.
Choice 4
Choice 5
Record Answ er
Choice 2
Choice 3
Choice 4
Choice 5
It uses attributes to place security information into the metadata of your code.
Record Answ er
More than one application domain can run within which one of the following objects?
Choice 1
A policy
Choice 2
A process
Choice 3
An assembly
Choice 4
A thread
Choice 5
Record Answ er
Choice 2
Choice 3
Choice 4
Choice 5
Record Answ er
Choice 2
System.Object
Choice 3
NOTHING
Choice 4
NULL
Choice 5
-1
Record Answ er
Delegate
Choice 2
Array
Choice 3
Int32
Choice 4
Pointer
Choice 5
Object
Record Answ er
float
Choice 2
struct
Choice 3
int
Choice 4
enum
Choice 5
Record Answ er
array
Which one of the following statements is an advantage gained through the .NET
framework's use of JIT (just in time compilation) and MSIL (Microsoft Intermediate
Language) when developing ASP.NET Web sites?
Choice 1
The MSIL can be compiled to any operating system, making .NET code multiplatform, like Java.
Choice 2
When using the Code Behind approach to ASP.NET Web site programming and
deployment, business logic code changes can be made directly to the .cs files or .vb
files on the server and they will be compiled automatically on the next request.
Choice 3
The MSIL code format has security mechanisms built-in to disallow unauthorized
parties from viewing your MSIL code and reverse engineering it.
Choice 4
The Web site does not need to be shut down to release and update the .dll
containing business logic for the Web site.
Choice 5
If a native image was not used to deploy a Web site, then the first time a page is
requested requires an initial compilation, but subsequent requests use the compiled
copy.
Record Answ er
Which one of the following ADO.NET command class methods executes a query and
returns the first column of the first row in the resultset returned by the query?
Choice 1
.ExecuteScalar()
Choice 2
.ExecuteReader()
Choice 3
.ExecuteNonQuery()
Choice 4
.ExecuteMessage()
Choice 5
.ExecuteAssembly()
Record Answ er