Framework
Framework
Framework
6. Which one of the following is the term used to describe the basic unit of deployment and
versioning in the .NET Framework?
a. Managed Module
b. .NET Portable Executable (PE) file
c. AppDomain
d. Assembly
e. Library
Ans: d
7. Which one of the following is NOT a member of a .NET class?
a. fields
b. events
c. methods
d. module
e. properties
Ans: d
8. The Common Language Runtime (CLR) just in time (JIT) compilers compile which item on
an as needed basis?
a. Component
b. Method
c. Assembly
d. Managed Module
e. Class
Ans: b
9. What does the .NET PermView.exe utility do?
a. It persists the view of a Dataset by serializing the view to an XML stream.
b. It sets the permissions on a Dataset view object.
c. It provides an interface to the persistable dynamic assemblies stored on disk.
d. It is used to view the minimal, optional, and refused permission sets requested by an
assembly.
e. It establishes a permanent view of the managed heap.
Ans: d
10. Les wants to select a family of operating systems that are shipped ready to load and run a
.NET Portable Executable file. Given the above scenario, which one of the following Microsoft
operating systems (OSs) should Les select?
a. All Windows OSs in the Win .NET family and above.
b. All Windows OSs in the Win9x, WinNT, and WinXP families and above.
c. All Windows OSs in the WinXP family and above
d. All Windows OSs in the Win2K family and above
e. All Windows OSs in the WinNT, Win2K, and WinXP families and above.
Ans: b
11. What type of application do you use to create a component to be added to an ASP.NET
page?
a. WebForm
b. Web Service
c. Windows Service
d. Windows Application
e. net module
Ans: a
12. Steve wants to use a .NET language that allows native code to be embedded in the .NET PE
file. Given the scenario above, which .NET compiler does Steve select?
a. cl.exe
b. vbc.exe
c. ilasm.exe
d. asm.exe
e. csc.exe
Ans: e
13. Versions can be assigned to which one of the following .NET elements?
a. Class
b. Application
c. Type
d. Method
e. Assembly
Ans: e
14. Which one of the following services provides transactional programming, object pooling, and
role based security?
a. COM/DCOM
b. MTS
c. CLR
d. ADO
e. COM+
Ans: e
15. Which one of the following is NOT true about application domains?
a. Application Domains are normally created by runtime hosts.-true
b. A thread can execute in different application domains of a process, but it is only in one
application domain at any given time.
c. Application Domains exist with processes.
d. Application Domains do not require remoting to communicate since they exist in the same
process.
e. Each application domain in a process shares the same copy of mscorlib.dll by default.
Ans: d
16. Which one of the following compares how garbage collection works in the .NET Framework
between local and distributed objects?
a. They are the same. Since the referenced object exists on the same heap, the garbage collection
mechanism is the same whether the object is local or distributed.
b. They are not the same. Local managed code garbage collection uses a collection mechanism
when the heap does not have room for a newly created reference object. The distributed managed
code garbage collection uses a lease arrangement similar to DHCP leases.
c. They are not the same. Local managed code garbage collection uses a collection mechanism
when the heap does not have room for a newly created reference object. The distributed managed
code garbage collection uses a reference counting mechanism.
d. The method of garbage collection is determined by the programmer at design time by
inheriting from either System.GC.Deterministic or System.GC.NonDeterministic namespace.
e. They are the same. Since the reference object is managed code, the garbage collection is
always deterministic and is invoked by the class destructor or Finalize() method explicitly by the
programmer.
Ans: c
17. From which one of the following locations does the garbage collector remove objects?
a. The global assembly cache
b. The system registry
c. The managed heap
d. The thread stack
e. The download cache
Ans: c
18. Alice wants to write an assembly that can be used by any other developer using any .NET
language. In the scenario above what guidelines should Alice follow?
a. The Common Type System (CTS) requirements for compliance for all classes and members
whether they are private, public, or inherited
b. The Common Language Specification (CLS) requirements for compliance for all classes and
members whether they are private, public, or inherited.
c. The Common Type System (CTS) requirements for compliance for only classes and member
that are exposed externally
d. Alice should write her assembly with a .NET compliant language that will guarantee language
interoperability.
e. The Common Language Specification (CLS) requirements for compliance for only classes and
members that are exposed externally
Ans: e
19. By default, a dynamic assembly is created as which one of the following?
a. .dll
b. .winexe
c. .exe
d. .netmodule
e. console app
Ans: a
20. Which one of the following .NET namespaces is the most similar to the Microsoft
24. Which one of the following statements is true about MSIL binary code?
a. It is only stored in assembly resource files.
b. It is only found in static assemblies.
c. It is compiled to native code by JIT compilers.
d. It is architecture specific.
e. It is source code specific.
Ans: c
25. Public methods whose names differ only by case are examples of which of the following
types?
a. CLS compliant but not CTS compliant
b. CTS and CLS compliant
c. Only CLI compliant
d. Neither CTS nor CLS compliant
e. CTS compliant but not CLS compliant
Ans: d
26. When does the JIT compiler compile a method?
a. When the developer packages the application
b. When the application loads
c. When the application is installed
d. Each time it is called
e. The first time it is called
Ans: e
27. In the Virtual Execution Engine of the Common Language Runtime, which operation occurs
first?
a. JIT
b. Verify
c. Exception management
d. Class Load
e. Garbage collection
Ans: d
28. John wants to install assemblies into the global assembly cache (GAC), remove them from
the GAC, and list the contents of the GAC. Given the above scenario, what .NET SDK utility
should John use?
a. gacutil.exe
b. soapsuds.exe
c. reggac.exe
d. regasm.exe
e. edtgac.exe
Ans: a
29. Which one of the following statements is true regarding how the .NET Framework minimizes
DLL Hell?
a. It registers all assemblies with the Global Assembly Cache (GAC).
b. It enforces that only one component of a given name can run on a machine at a time.
c. It only allows multiple versions of a given component to run on a machine at a time if they all
are private assemblies.
d. It allows Side-by-Side execution on the same machine, at the same time or even the same
process, of any version of the same shared DLL.
e. It registers all assemblies with the COM+ catalog.
Ans: d
30. The .NET Portable Executable (PE) file differs from the standard Windows PE file in which
one of the following ways?
a. The .NET PE removes the IL code section.
b. The .NET PE removes the metadata section.
c. The .NET PE adds native code section.
d. The .NET PE adds the CLR header and the CLR data sections.
e. The .NET PE does not include the PE/COFF headers
Ans: d
31. Mary wants to create a .NET proxy component for a legacy COM component so that her
.NET components can use it. Given the scenario above, what tool does Mary use?
a. comproxy.exe
b.proxy.exe
c. al.exe
d. tlbimp.exe
e. tlbexp.exe
Ans: d
32. VB.NET
<Assembly:AssemblyCultureAttribute("de")
C#
[assembly:AssemblyCultureAttribute("de")
Given the code sample above, what type of assembly does the code create?
a. Strongly named
b. Static
c. All private assemblies
d. Dynamic
e. Satellite
Ans: e
33. The benefit of ADO.NET being able to communicate across heterogeneous environments is a
result of which one of the following?
a. The data and protocol are designed by the client and server on a case by case basis.
b. The protocol is based on TCP Sockets.
c. The data is delivered Network Data Representation (NDR).
d. The protocol is COM/DCOM based.
e. The data is delivered in XML format.
Ans: e
34. Jill wants to generate a public/private key pair for use in creating a shared assembly.
Given the above scenario, which one of the following .NET SDK utilities does Jill use?
a. resgen.exe
b. certmgr.exe
c. secutil.exe
d. sn.exe
e. gacutil.exe
Ans: d
35. 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?
a. .NET Web Services
b. .NET Console Applications
c. .NET Windows Services
d. .NET Windows Forms Applications
Ans : a
36. 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).
a. In the above scenario, which one of the following assembly types does Karin deploy?
b. A dynamic assembly
c. A public assembly
d. A private assembly
e. A global assembly
Ans: d
37. Which one of the following statements is true with regard to releasing memory from objects
that are no longer used or have gone out of scope?
a. The .NET Framework releases the memory used by managed objects through a Just-In-Time
(JIT) compilation process.
b. The memory used by managed objects is released when the reference count reaches -1.
c. The .NET Framework releases the memory used by managed objects through a Garbage
Collection (GC) process.
d. The memory used by managed objects is released when the reference count reaches 0.
Ans: c
38. You are creating a .NET Windows Forms application, and you need to connect to a
Microsoft Access database. Given the scenario above, which one of the following data
namespaces do you use for creating your data access connection?
a. System.Data.OleDb
b. System.Data.OracleClient
c. System.Data.SQLClientCE
d. System.Data.SqlClient
e. System.Data
Ans: a
39. The <authorization> and <authentication> elements for a Web site are stored within which
one of the following Web.Config elements?
a. <system.web>
b. <compilation>
c. <globalization>
d. <appsettings>
e. <trace>
Ans: a
40. 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?
a. J#
b. C#
c. Visual Basic .NET
d. Visual C++ with managed extensions
e. JScript .NET
Ans: a
41. public class Invoice : InvoiceBase, IData
{
}
Referring to the C# class definition in the sample above, which one of the following statements
is true about this class inheritance hierarchy?
a. The Invoice class implements multiple inheritance by inheriting from the InvoiceBase class
and the IData interface.mc
b. The Invoice class inherits from the InvoiceBase class and implements the IData interface.
c. The Invoice class is a super-class to the InvoiceBase class and IData interface.
d. The InvoiceBase class inherits from the Invoice class and the IData interface inherits from the
InvoiceBase class.
e. The Invoice class is a partial class, along with the InvoiceBase class.
Ans: b
42. Which one of the following statements must be true for the Common Language Runtime to
be able to completely isolate assemblies from each other?
a. All source code must be written in C# or VB.NET.
b. All MSIL code must have been run through an obfuscator.
c. All code must be written in the same .NET language.
d. All code must include XML comments on each public class member.
e. All code must be type-safe.
Ans: e
43. Which one of the following is the most granular unit that the Common Language Runtime
(CLR) uses to isolate applications from one another, preventing code from one application
accessing code in another application for security purposes?
a. Assembly
b. Thread
c. AppDomain
d. Process
e. Global Assembly Cache (GAC)
Ans: c
44. 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?
a. Let automatic garbage collection clean up the unmanaged resource.
b. Create a finalize method and let the garbage collector execute it at collection time.
c. Unload the application domain that contains the resource.
d. Create a Dispose method and call it explicitly when he wants to release the resource.
e. Call the System.GC.Collect method.
Ans: d
45. Sample Web.Config
configSections>
<sectionGroup name="system.web">
<section name="myConfig" type="MyConfig.MyConfigSectionHandler,MyConfig" />
</sectionGroup>
</configSections>
Referring to the portion of the sample Web.Config file above, to which one of the following does
the type="MyConfig.MyConfigSectionHandler,MyConfig" line refer?
a. It specifies that the MyConfig.MyConfigSectionHandler class in the MyConfig assembly
should be used to parse this custom section, and as such, it must implement the
IConfigurationSectionHandler interface.
/* here the section type is of the form namespace.classname , assemblyname. Since the class is
resided in a separate assembly. If the handler class appears in the app_code then the type value
takes up the class name*/
b. It specifies that the MyConfig class in the MyConfigSectionHandler assembly should be used
to parse this custom section, and as such, it must implement the IConfigurationSectionHandler
interface.
c. This line specifies that the MyConfig.MyConfigSectionHandler assembly should be used to
parse this custom section, and as such must implement the IConfigurationSectionHandler
interface.
d. It specifies that the MyConfig.MyConfigSectionHandler class in the MyConfig assembly must
be installed in the GAC (Global Assembly Cache).
e. It specifies that this custom section is named MyConfig.MyConfigSectionHandler.
Ans: a
46. The .NET implementation of Delegates uses which one of the following sets of information
as the Delegate signature?
a. Method name only
b. Method input parameters and name only
c. Method input parameters and return type only
d. Method input parameters only
e. Method return type only
Ans: c
47. You are creating a .NET Windows Forms application named MyGreatApp.exe that uses an
application configuration file for startup information. Referring to the scenario above, what must
your application configuration file be named once you have compiled and deployed your
application?
a. MyGreatApp.config
b. MyGreatApp.xml
c. App.xml
d. App.Config
e. MyGreatApp.exe.config
Ans: e
48. Value types always have which one of the following modifiers?
a. Abstract
b. InitOnly
c. Sealed
d. Virtual
e. Static
Ans: c
49. CompareOp localCompareOp = new CompareOp(Currency.RhsIsGreater);
Sorter.Sort(numbers, localCompareOp);
Referring to the sample code above, assume CompareOp is a delegate. Looking specifically at
the second line of code, the delegate is being used to implement which one of the following types
of programming constructs?
a. Multi-cast delegate
b. Asynchronous delegate
c. Local delegate
d. Callback function
e. EventHandler
Ans: e
50. Bill owns a large software company. He is releasing a service pack containing an assembly
that fixes some bugs and is intended to be backward compatible with the previous version of the
assembly. Given the scenario above, what does Bill ship with his new assembly?
a. An XML application configuration file
b. An XML machine configuration file
52. Which one of the following .NET keywords or operators triggers the C# or VB.NET
compiler to generate two methods in the background that are used to manage the underlying
delegate?
a. += operator
b. EventArgs keyword
c. EventHandler keyword
d. Event keyword
e. -= operator
Ans: c
53. Linda has registered a strongly named assembly in the Global Assembly Cache with a higher
version number than one that already has been registered. Given the scenario above, which one
of the following statements is true regarding the side-by-side execution of her assembly?
a. The two assemblies can run at the same time and in the same process.
b. The two assemblies cannot run at the same time, but either one can run at any one time.
c. The two assemblies can run at the same time, but only in different processes.
d. The two assemblies can run at the same time only if they are both registered against the
COM+ catalog.
e. The two assemblies can run at the same time, but they must be in the same process.
Ans: a
54. Which one of the following .NET Framework namespaces do you use to implement the runtime and design-time behavior of controls such as user controls derived from
System.Windows.Forms.UserControl?
a. System.EnterpriseServices
b. System.Web.UI
c. System.Web
d. System.Windows
e. System.ComponentModel
Ans: e
55. You are writing an application that is initially designed to use an Oracle database. You know
that there is a good chance that your company will be changing their corporate standard database
platform to Microsoft SQL Server in the near future. You are concerned that your application
needs to function with a minimum of changes if the database platform ever changes from Oracle
to SQL Server. Given the scenario above, how do you declare your DataReader objects to
minimize the impact of a change to the database platform in the future?
a. 'VB.NET
Dim myReader As IDataReader = myCommand.ExecuteReader()
'C#
IDataReader myReader = myCommand.ExecuteReader();
b. 'VB.NET
Dim myReader As OleDbDataReader = myCommand.ExecuteReader()
'C#
OleDbDataReader myReader = myCommand.ExecuteReader();
c. 'VB.NET
Dim myReader As SQLDataReader = myCommand.ExecuteReader()
'C#
SQLDataReader myReader = myCommand.ExecuteReader();
d. 'VB.NET
Dim myReader As OracleDataReader = myCommand.ExecuteReader()
'C#
OracleDataReader myReader = myCommand.ExecuteReader();
e. 'VB.NET
Dim myReader As OdbcDataReader = myCommand.ExecuteReader()
'C#
OdbcDataReader myReader = myCommand.ExecuteReader();
Ans: b
56. Sally is a managed type library developer. She wants to ensure that her library can be used by
all the .NET languages. Given the scenario above, which one of the following rules does Sally
follow?
a. Just In Time (JIT)
b. Common Type System (CTS)
c. Common Language Runtime (CLR)
d. Extensible Markup Language (XML)
e. Common Language Specification (CLS)
Ans: e
57. You are creating an ASP.NET application. You decide to use RegEx string matching objects
to help protect against Cross Site Scripting attacks. Given the scenario above, this is an example
of which one of the following security areas that should be considered when creating an
ASP.NET application?
a. Securing database connection credentials
b. Code access security
c. Securing state data
d. Securing user input
d. System.Activator
e. System.Runtime
Ans: c
62. Which one of the following explains how .NET Framework alleviates DLL Hell?
a. The Common Language Runtime (CLR) and Assemblies can only use the version of a
component with which they were compiled.
b. The Common Language Runtime (CLR) does not allow administrators to change the version
of a component that an Assembly references externally.
c. The identity and state of all managed code is maintained in the system registry at runtime.
d. The Common Language Runtime (CLR) only allows a single version of a component to be
registered in the Global Assembly Cache (GAC).
e. The Common Language Runtime (CLR) and Assemblies specify and enforce versioning rules
and allow side-by-side execution of a software component.
Ans: e
63. When is a reference type released?
a. When the developer explicitly invokes its Finalize method
b. When the developer explicitly invokes its Dispose method
c. When the reference counter reaches 0
d. When the developer explicitly sets its value to nothing and the garbage collector moves the
object to generation zero
e. When the garbage collector finds that no roots reference it during a collection
Ans: e
64. Joan registers a strongly named assembly in the Global Assembly Cache (GAC). She does
this so that a hash is performed on the assembly file containing the manifest with the public key,
and she verifies it against the hash of the manifest created with the private key at build time.
Given the scenario above, when is this comparison performed?
a. Each time the Common Language Runtime (CLR) loads the assembly
b. Each time a runtime host loads the Common Language Runtime (CLR)
c. When the assembly is registered with the GAC
d. When the sn.exe program is executed
e. When the JIT compiler in the Common Language Runtime (CLR) compiles the assembly
Ans: c
65. Which one of the following public methods of a delegate is new in .NET 2.0?
a. Invoke()
b. BeginInvoke()
c. InvokeMethod()
d. EndInvoke()
e. DynamicInvoke()
Ans: e
66. Brian has a custom business object model. He needs to instantiate a strongly typed collection
of one of his domain objects. In which one of the following namespaces does Brian find classes
suited to the task described in the scenario above?
a. System.Collections.Specialized
b. System.Collections
c. System.Data
d. System.Collections.StrongTyping
e. System.Collections.Generic
Ans: b
67. In order to create a custom role based security mechanism, which one of the following
interfaces do you implement?
a. ISecurityToken
b. IRoleProvider
c. IPrinciple
d. IIdentity
e. IUser
Ans: c
68. Steve wants to create a .NET application that is accessible over HTTP, offers its payload in
XML, and is accessible programmatically. Given the scenario above, what type of application
does Steve create?
a. Windows console application
b. Web Service
c. Windows Service
d. Windows GUI application
e. Distributed COM
Ans: b
69. When enumerating over a Dictionary<T, K>, which one of the following types of objects
does the enumerator return?
a. DictionaryEntry<T, K>
b. IEnumerable<K>
c. KeyValuePair<T, K>
d. LookupEntry<T, K>
e. You cannot enumerate a Dictionary<T, K>.
Ans: c
70. Which one of the following is NOT true concerning exceptions?
a. Throwing an exception is a costly operation.
b. All exceptions have an InnerException property.
c. Exceptions should be used to handle basic program flow.
d. You can obtain a stack trace from an exception.
e. All exceptions ultimately inherit from Exception.
Ans: c
71. Steve wants to view the underlying object type of an integer in the .NET Framework class
library. Given the scenario above, in which one of the following namespaces does Steve look?
a. System
b. System.Runtime
c. System.Data
d. Microsoft.Win32
e. System.Reflection
Ans: a
72. While the DateTime type has a variety of ways of displaying the date as a string, which one
of the following is NOT a valid display option?
a. DateTime.ToDateString()
b. DateTime.ToString("dddd MMMM %d yyyy")
c. DateTime.ToLongDateString()
d. DateTime.ToShortDateString()
e. DateTime.ToString("D")
Ans a
73. Gail wants to compile her Visual Basic .NET source code. Given the scenario above, which
one of the following command-line tools does Gail use?
a. vbnet.exe
b. cl.exe
c. vbc.exe
d. vb.exe
e. csc.exe
Ans: c
74. How do you deterministically release unmanaged resources held by a reference object?
a. Use a destructor.
b. Let the garbage collector release the resources automatically. (non deterministically)
c. Use a Finalize method.
d. Use the Release method
e. Use a Dispose method.
Ans: a
75. The Common Language Runtime (CLR) is very efficient for creating objects on the managed
heap for which one of the following reasons?
a. It uses a pointer to the next object location that is incremented by the size of the last object.
b. It uses linked lists to manage objects.
c. It uses a First-In-First-Out (FIFO) stack of typed pointers to manage heap objects.
d. It uses a round robin queue that has three generations.
e. It uses directed graphs to manage objects consisting of only reachable objects.
Ans: e
76. Linda has registered a strongly named assembly in the Global Assembly Cache with a higher
version number than one that already has been registered. Given the scenario above, which one
of the following statements is true regarding the side-by-side execution of Linda's assembly?
a. The two assemblies can run at the same time, but only in different processes.
b. The two assemblies can run at the same time only if they are both registered against the
COM+ catalog.
c. The two assemblies cannot run at the same time, but either one can run at any one time.
d. The two assemblies can run at the same time, but they must be in the same process.
e. The two assemblies can run at the same time, but they must be in the same application domain.
Ans: d
77. 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?
a. .NET Remoting
b. .NET Windows Forms Applications
c. .NET Web Services
d. .NET Console Applications
e. .NET Windows Services
Ans: c
78. 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?
a. GacUtil.exe
b. Aspnet_regiis.exe
c. NGen.exe
d. Xsd.exe
e. InstallUtil.exe
Ans: b
79. Judy wants to read a very large XML document. In order to access the data, she wants to use
a fast, noncached, forward-only stream. Given the above scenario, which class from the
System.Xml namespace does Judy use?
a. XmlText
b. XmlElement
c. XmlTextWriter
d. XmlTextReader
e. XmlDocument
Ans: d
80. .NET Framework configuration files are physically stored in which one of the following
formats?
a. A digitally signed XML file
b. A .INI file
c. An XML file
d. An encrypted .INI file
e. A Binary file
Ans: c
81. 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?
a. System.Security.Cryptography
b. System.Xml
c. System.Text.Encoding
d. System.Security.Policy
e. System.Security.SecurityElement
Ans: a
82. From which one of the following locations does the garbage collector remove objects?
a. The download cache
b. The system registry
c. The global assembly cache
d. The managed heap
e. The thread stack
Ans: d
83. Which one of the following types is a value type?
a. Pointer
b. Delegate
c. Object
d. Array
e. Int32
Ans: e
84. Carl has been given the task of creating a Windows desktop application with the .NET
Framework. Given the scenario above, which one of the following namespaces does Carl use
most frequently while developing this application?
a. System.Net
b. System.Web.UI
c. System.Web.Services
d. System.Windows.Forms
e. Microsoft.Win32
Ans: d
85. Versions can be assigned to which one of the following .NET elements?
a. Attribute
b. Method
c. Assembly
d. Class
e. Type
Ans: c
86. You are creating a .NET Windows Forms application, and you need to connect to a
Microsoft Access database. Given the scenario above, which one of the following data
namespaces do you use for creating your data access connection?
a. System.Data
b. System.Data.SQLClientCE
c. System.Data.OracleClient
d. System.Data.SqlClient
e. System.Data.OleDb
Ans: e
87. The .NET framework fully supports inheritance, polymorphism, and constructors. Referring
to the statement above, the .NET framework fully supports which one of the following
programming paradigms?
a. Native machine code compilation
b. Unmanaged memory
c. Single language support
d. Variant data types
e. Object oriented programming
Ans: e
88.All .NET Framework managed code runs within which one of the following?
a. VBC.exe (VB.NET Compiler)
b. Just-In-Time Compilation (JIT)
c. Internet Explorer acting as a .NET managed code host
d. CSC.exe (C# Compiler)
e. Common Language Run-time (CLR)
Ans: e
89. Steve wants to create a .NET application that is accessible over HTTP, offers its payload in
XML, and is accessible programmatically. Given the scenario above, which one of the following
application types is best suited for the business logic tier residing on the application server?
a. Windows console application
b. Windows Service
c. Windows GUI application
d. Web Service
e. Distributed COM
Ans: d
90. Which one of the following .NET Framework languages is new and provides constructs and
syntax similar to Java and C++, in addition to some unique new constructs?
a. C#
b. VB.NET
c. Fortran .NET
d. MSIL
e. COBOL .NET
Ans: a
91. Which one of the following features of the .NET Framework plays the most integral role in
allowing language interoperability?
a. Managed memory
b. Support for implementation inheritance
c. Garbage Collection (GC)
d. Just-In-Time compilation (JIT)
e. Common Type System (CTS)
Ans: e
92. By default, a dynamic assembly is created as which one of the following?
a. .com
b. .bat
c. .dll
d. .exe
e. .netmodule
Ans: c
93. Which one of the following terms do you use to describe the fundamental unit of deployment
and versioning in the .NET Framework?
a. .NET Portable Executable (PE) file
b. AppDomain
c. .DLL
d. Assembly
e. Managed Module
Ans: d
94. .NET events actually use which one of the following underlying .NET technologies to wire
the event to the event handler?
a. Pointers
b. Remoting
c. Reflection
d. Exceptions
e. Delegates
Ans: e
95. What is the default value for a System.Int32 variable?
a. NULL
b. NOTHING
c. System.Object
d. 0
e. -1
Ans: d
96. ADO.NET is able to communicate across heterogeneous environments. The benefit of the
above referenced statement is a result of which one of the following?
a. The data and protocol are designed by the client and server on a case-by-case basis.
b. The data is delivered as a Network Data Representation (NDR).
c. The protocol is based on TCP sockets.
d. The data is serialized in XML format.
e. The protocol is COM/DCOM based.
Ans: d
97. Which one of the following .NET technologies is best used to communicate or pass objects
between application domains?
a. ByVal objects
b. .NET C++ code using managed extensions only
c. .NET Remoting
d. .NET Arrays
e. COM objects
Ans: c
98. Randy wants to be able to assign an instance of a derived type to a variable of its parent type.
He wants the derived types to have different functionality in identically named methods. Given
the above scenario, of which one of the following object oriented concepts implemented in the
.NET framework is this an example?
a. Encapsulation
b. Hierarchical
c. Polymorphism
d. Object-Oriented
e. Inheritance
Ans: c
99. Which one of the following tools is used to view the metadata information contained in a
.NET assembly?
a. ilasm.exe
b. ildasm.exe
c. al.exe
d. vbc.exe
e. csc.exe
Ans: b
100. You are working on a routine that requires a very large number of string concatenations.
You are concerned about the performance of the routine. Given the scenario above, which one of
the following .NET Framework members do you use when programming your routine?
a. The language specific concatenation operator: & for VB.NET and + for C#
b. System.String.Format()
c. System.Text.Encoding
d. System.Text.StringBuilder
e. System.String.Concat()
Ans: d
101. Which one of the following is a benefit of a reference type?
a. It does not require garbage collection.
b. It does not make copies of itself when passed as a parameter.
c. It takes less machine cycles to manage than a value type.
d. It is usually smaller than a value type.
e. It is never null.
Ans: b
102. You are creating an assembly containing financial calculations that you intend to share
across several projects. During deployment, you want your assembly to be installed in the Global
Assembly Cache (GAC). Given the scenario above, which one of the following statements is
true?
a. Your assembly must be culture-neutral.
b. Your assembly must be verifiably type-safe.
c. Your assembly must be strongly named.
d. Your assembly must have an explicit version number with no asterisks(*) in any component of
the version number.
e. Your assembly must be given an eight-character name.
Ans: c
103. Which one of the following statements is true about reference types?
a. They are stored on the stack.
b. They always pass a copy of themselves in a method.
c. They cannot be used as output parameters in a method.
d. They can never be null.
e. They are allocated on the managed heap.
Ans: e
104. Which one of the following .NET Framework base namespaces do you use to interact with
the GDI+ subsystem of the Microsoft Windows XP operating system?
a. System.XML
b. System.Drawing
c. System.IO
d. System.Data
e. System.Text
Ans: b
a. .pdb
b. .xml
c. .src
d. .dll
e. .exe
Ans: a
111. Which one of the following .NET types is like a class, can contain constructors, constants,
fields, methods, properties, indexers, and operators, but does NOT support inheritance and is
actually a value type, not a reference type?
a. Array
b. Object
c. Structure
d. Delegate
e. Interface
Ans: c
112. A string is which kind of object?
a. Global
b. Attribute
c. Reference
d. Delegate
e. Value
Ans: c
113. Which one of the following statements about the .NET Framework is true?
a. When installing the .NET Framework, any prior version of the .NET Framework found is
automatically upgraded to the installation version, guaranteeing backwards compatibility.
b. When installing the .NET Framework, Windows 95 computers require an account with
Administrator privileges to successfully complete the Framework installation.
c. When installing the .NET Framework, the X-COPY deployment feature of .NET provides you
with the ability to copy/paste the C:\WINDOWS\Microsoft.NET\Framework\ folder from one
computer to the next for installation.
d. When installing the .NET Framework, previously installed versions is left intact; the .NET
Framework provides for multiple versions to be installed on the same computer.
e. When installing the .NET Framework, only Microsoft Windows Server products allow
multiple versions to be installed concurrently.
Ans: d
114. Which one of the following types is a reference type?
a. enum
b. struct
c. int
d. float
e. Array
Ans: e
115. Randy wants to use a type that provides call-back capabilities for events. Given the scenario
above, which one of the following types does Randy use to provide the call-back?
a. Context
b. Pointer
c. Transaction
d. Delegate
e. Attribute
Ans: d
116. Which one of the following gives the developer the most control over immediately releasing
resources?
a. The Finalize method
b. The class loader
c. The Just-In-Time (JIT) compiler
d. The garbage collector
e. The Dispose method
Ans: e
117. Which one of the following .NET Class members provides functionality similar to a
Property but provides a parameter for accessing specific member instances?
a. Events
b. Accessors
c. Operators
d. Structures
e. Indexers
Ans: e
118.. Referring to the .NET 1.1 Configuration Tool in the image above, which one of the
following types of security do you configure using this tool?
a. Role Based Security
b. Programmatic Security
c. Declarative Security
d. Code Access Security
e. User Input Security
Ans: d
119. Which one of the following .NET framework members or methodologies do you use to
extend your assemblies' meta-data with custom application information?
a. Compile with the /reference option
b. System.Reflection.Assembly namespace members
c. Attributes
d. Use the MSIL Disassembler (Ildasm.exe) tool
e. XML comments
Ans: c
120. When using a multicast delegate, which one of the following statements is true?
a. The .BeginInvoke() method must be used to explicitly call the contained method.
b. A delegate cannot be used to wrap multiple method targets.
c. The delegate must be declared as public.
d. The delegate signature must return a void.
e. The delegate must be declared as private.
Ans: d
121. Which one of the following statements is true with respect to the Common Language
Runtime (CLR)?
a. The C# and VB.NET compilers compile source code to native code.
b. All .NET languages that use the CLR produce only CLS (Common Language Specification)
compliant code.
c. Code compiled in one .NET language can interact with code compiled in a different .NET
language.
d. The Common Language Run-time compiles source code to MSIL code.
e. The CLR does NOT implement a Common Type System.
Ans: c
122. You are working on a procedure that needs access to some Integer data. You decide to
declare some variables to work with this Integer data. Referring to the scenario above, why do
you declare your variables as a simple type (Int32) rather than the Object super-type?
a. Use of the Object type allows the compiler to optimize the MSIL it produces.
b. Use of the Object type is less efficient than a native type because it is always late bound.
c. Use of the Object type is equal in efficiency to the use of a native type, but may use more
memory.
d. Use of the Object type forces all data to be stored on the Stack.
e. The Object type does support the .Equals() method for equality comparisons.
Ans: b
123. The PEVerify tool is used to determine which one of the following?
a. If the specified MSIL code is type-safe
b. If the specified MSIL code is verifiably type-safe
c. If the specified C# code only is verifiably type-safe
d. If the specified native code is verifiably type-safe
e. If the specified source code is type-safe
Ans: b
124. You need to create an application that can be rendered to a variety of devices using different
user interface technologies, including HTML, compact HTML (cHTML), and WML. Given the
scenario above, which one of the following .NET application types was specifically created to
best handle this?
a. .NET Smart Device Application
b. .NET Windows Application
c. .NET Console Application
d. ASP.NET Mobile Web Application
Ans: e
129. An ADO.NET Transaction is created on which one of the following ADO.NET objects?
a. DataAdapter
b. Dataset
c. DataReader
d. Command
e. Connection
Ans: e
130. By implementing Code Access Security in their code, the developer can achieve which one
of the following objectives?
a. Ensure that the client machine administrator cannot specify the rights an assembly may have.
b. Ensure that only users with the proper roles can access the assembly.
c. Enable the assembly to receive whatever rights it may require on any target client.
d. Enable code to demand that its callers have specific permissions.
e. Ensure that if an assembly has the rights to compile, it has all the necessary rights to run on
any client.
Ans: d
131. In order for a type to be used and inherited by another component written in a different
.NET language, to which one of the following standards must it adhere?
a. COM+
b. COM/DCOM
c. GAC (Global Assembly Cache)
d. CLS (Common Language Specification)
e. CTS (Common Type System)
Ans: d
132. Which one of the following statements is NOT true with respect to type-safety?
a. Type-safe code accesses types only in well-defined, allowable ways, thereby preventing
overrun security breaches.
b. Type-safe code accesses only the memory locations it is authorized to access.
c. Type-safe components can execute safely in the same process even if they are trusted at
different levels.
d. Type-safe code provides assurances that security restrictions on code can be reliably enforced.
e. Type-safe code can directly read values from another object's private fields or code areas.
Ans: e
133. When referencing a COM object to be consumed in your .NET Windows Forms
application, when is the reference to the COM object released?
a. When the form using the referenced COM object has its visible property set to FALSE
b. When the variable referencing the run-time callable wrapper (RCW) goes out of scope
c. When the variable referencing the run-time callable wrapper (RCW) is garbage collected and
destroyed
d. When the variable referencing the COM callable wrapper (CCW) goes out of scope
138. 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?
a. She has her class explicitly inherit from System.Object.
b. She references the System.Reflection namespace and adds an attribute specifying ObjectType.
c. She overrides the GetType() method with code to return the type of the class she is coding.
d. She does nothing; a GetType() method is implicitly inherited by all classes from
System.Object.
e. She references the System.Reflection namespace in her code.
Ans: d
139. Which one of the following statements is true about garbage collection?
a. It is invoked every time a constructor is called.
c. It is invoked when generation 0 does not have room for the newly created object.
d. It is invoked every 40 seconds until the process is destroyed.
e. It is invoked when the Dispose method is explicitly called.
Ans: c
140. More than one application domain can run within which one of the following objects?
a. A process
b. A thread
c. A policy
d. An assembly
e. A remote application domain
Ans: a
141. Declarative security does which one of the following?
a. It sets the permissions on any reference types that are declared.
b. It is implemented by code and does not use attributes.
c. It configures the machine's system security policy.
d. It uses attributes to place security information into the metadata of your code.
e. It sets the permissions on any value types that are declared.
Ans: d
142. You are taking on a maintenance role for an existing .NET project. When you first start to
inspect the source code, you notice a Interop.FinancialCalcs.dll file located in the /bin/debug/
folder of the .NET project. Referring to the scenario above, which one of the following
statements is true about the .NET project?
a. The existence of the Interop.FinancialCalcs.dll file indicates that this project is using .NET
Remoting.
b. The existence of the Interop.FinancialCalcs.dll file indicates that this project has been
compiled for interoperability across all hardware platforms.
c. The existence of the Interop.FinancialCalcs.dll file indicates that a legacy COM object, named
FinancialCalcs.dll, is used in the project.
d. The existence of the Interop.FinancialCalcs.dll file indicates that a .NET assembly, named
FinancialCalcs.dll, is used in the project.
e. The existence of the Interop.FinancialCalcs.dll file indicates that a C++ library, named
FinancialCalcs.dll, is referenced in the project.
Ans: d
143. 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?
a. ClassInterfaceAttribute>
b. <GuidAttribute>
c. <ComEventInterfaceAttribute>
d. <ComImportAttribute>
e. <ComVisibleAttribute>
Ans: e
144. Phil wants to select a .NET language that has source code XML documentation creation
features built into the compiler. Given the scenario above, which one of the following .NET
framework 1.1 language compilers does Phil select?
a. ilasm.exe
b. csc.exe
c. asm.exe
d. vbc.exe
e. cl.exe
Ans: b
145. Maggie is using Windows security in conjunction with IIS in her ASP.NET Web
application in order to control who is allowed to access her intranet site. In the scenario above,
which one of the following functions does the Windows security with IIS provide?
a. Authorization
b. Certificate services
c. Validation
d. Authentication
e. Impersonation
Ans: d
146. CarObject obj = new CarObject();
obj.TireSize = 123;
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream("TestFile.bin", FileMode.Create, FileAccess.Write,
FileShare.None);
formatter.Serialize(stream, obj);
stream.Close();
Referring to the C# code in the sample above, you receive a SerializationException. Which one
of the following choices describes the cause of this exception?
a. You did not mark the CarObject class with the Serializable attribute.
b. Tiresize is a Private property and you can only serialize Public properties.
c. You cannot use a binary formatter to serialize application class instances.
d. You cannot serialize application class instances, only system class instances.
e. You must supply the desired .XSD schema when using a binary formatter.
Ans: a
147. Which one of the following .NET types is a Value type?
a. Array
b. Date Time
c. Class
d. Delegate
e. String
Ans: b
148. Which one of the following statements is true about value types?
a. They are stored on the managed heap.
b. They cannot be sealed.
c. They can never be assigned a null value.
d. They are initialized to null.
e. They are passed by reference in a method.
Ans: e
149. The .NET Framework significantly reduces the chance of buffer overrun security
vulnerabilities through its use of which one of the following design philosophies?
a. Assembly Versioning
e. DataAdapter
Ans: e
154. Joe wants to apply the Common Type System (CTS) visibility rule for a method so that it is
callable only from derived types and the type to which it belongs. Given the above scenario,
which one of the following is the correct modifier?
a. Abstract
b. Public
c. Private
d. Assembly (referred to as "internal" in many languages)
e. Family (referred to as "protected" in many languages)
Ans: e
1.
9. What is the best term used to describe the Fundamental unit of deployment and versioning
in .NET framework?
Ans: Assembly
10. Which of the following .NET type is like a class, that can contain constructors, fields
methods, indexers and properties, but does not support inheritance and also is a value type
?
Ans: struct
11. The memory allocated to reference is always released in which of the following ways?
Ans: when the reference counter reaches 0
12. How do you add and remove assembly from GAC?
Ans:
gacutil.exe/l.myassembly.dll,
gacutil.exe/u.myassembly.dll
13. .NET web services allow remote applications to easily communicate over http port 80 using
XML. State true or false?
Ans: true
14. What is CTS in .NET?
Ans: It defines the Rules concerning datatype. (The common type system defines how types
are declared, used, and managed in the common language runtime)
15. How can you create a Strong name for a .NET assembly?
Ans: with the help of sn.exe
16. What is Reflection?
Ans: Enables an application to discover info about classes in order to access the class
members, create new types at run time.
17. What are the Data types supported by CTS?
Ans: both value and reference type
18. Not a .NET compatible language?
Ans: Java
19. In .NET Event programming delegates are used for declaring and implementing which one of
the following event programming structures?
Ans: EventHandler
20. What is Private assembly?
Ans: Assembly that is Applicable to particular applications where they are kept.
21. What is the Diff b/w namespace and assembly?
Ans:
24.Reflector--->is a cross browser,decompiler and static analyzer for software created in .net frame
work.
Private Assemblies are intended to be used by the program for which its made for. This is
because application will only load private assemblies that are located in the same folder or
in a sub folder that the main executable is loaded.