98-372 Exam Questions
224 real 98-372 exam questions with expert-verified answers and explanations. Page 3 of 5.
- Question #111Understanding Methods and Events
Which element is NOT required if you need a custom class to raise an event?
eventsevent handlerdelegateEventArgs - Question #112Understanding Namespaces and Classes
Which class is used to write primitive types in binary to a stream and supports writing strings in a specific encoding?
BinaryWriterSystem.IOstreamsbinary data - Question #113Understanding Data Types and Collections
You are creating an application using .NET Framework 4.0. You write the following code segment in the application. class CompGenerate <T> where T : IComparable { public T t1; publi...
genericstype constraintsIComparableconstructor syntax - Question #114Understanding Namespaces and Classes
Which class is a byte of data that reads and writes from and to a disk?
Stream classSystem.IObyte datafile I/O - Question #115Understanding Namespaces and Classes
Namespaces are used a lot in C# programming in two ways. What are those two ways? Each correct answer represents a part of the solution. Choose two.
namespacesnamespace keywordclass organizationC# - Question #116Understanding Data Types and Collections
You are creating an application using .NET Framework 4.0. You need to use a last-in, first- out collection in the application. Which of the following is a last-in, first-out collec...
StackLIFOcollectionsdata structures - Question #117Understanding .NET Framework Concepts
How is an XmlWriter object useful when writing XML data to XML documents? Each correct answer represents a complete solution. Choose all that apply.
XmlWriterXMLwell-formed XMLCLR types - Question #118Understanding .NET Framework Concepts
What are the benefits of asymmetric key cryptography? Each correct answer represents a complete solution. Choose all that apply.
asymmetric cryptographykey revocationpublic key cryptographysecurity - Question #119Understanding Methods and Events
You are creating an application using .NET Framework 4.0. You need to provide standard parameters for an event handler delegate. Which of the following are standard parameters for...
event handler delegateEventArgsObjectevent parameters - Question #120Understanding .NET Framework Concepts
How will you define a default value, Yellow, for a simple element of the XML schema?
XML schemaXSDdefault valueelement definition - Question #126
What is the characteristic of a delegate?
- Question #127
Which two actions should you perform to consume events defined in another class? (Each correct answer presents part of the solution. Choose two.)
- Question #128
You write code that reads a file from the disk. Which exception will catch an error if the file is missing?
- Question #129
In which folder should you store the web.config file in a .NET web application?
- Question #130
Which file contains the required .NET settings for an ASP.NET web application?
- Question #131
You want to raise a custom exception. Which keyword should you use?
- Question #132
You define a method according to the following code segment. (Line numbers are included for reference only.) Where should you insert code that must be executed, regardless of wheth...
- Question #133
You have created a program that writes status updates into a file. You want to modify the file. You need to ensure that other users can view the file while it is being modified. Wh...
- Question #134
Where are the command line arguments stored for a console application?
- Question #135Understanding Namespaces and Classes
Which two classes in the .NET Framework allow you to delete a file? (Each correct answer presents a complete solution. Choose two.)
System.IO.FileSystem.IO.FileInfofile operationsdelete - Question #136
You want to substitute values in a string that is displayed on the console. Which code fragment will display "Hello, World"?
- Question #137
A class named Student is contained inside a namespace named Contoso.Registration. Another class named Student is contained inside a namespace named Contoso.Contacts. You need to us...
- Question #138
You want to create a class named ShoppingCart that has a type argument named TItem. The TItem type argument must be a value type. Which code segment should you use to define the Sh...
- Question #139
Which is the base class of all classes in the .NET Framework?
- Question #140
You create a class library named Contoso.Business. The library is used in a Windows application named Contoso.Ui. In which file should you store application configuration settings...
- Question #141
Which describes the effect of applying the protected accessibility modifier to a method?
- Question #142
What is the purpose of strong naming?
- Question #143
Which standard allows data types to be interchanged among all Common Language Infrastructure (CLI) programming languages?
- Question #144Understanding .NET Framework Concepts
Which two methods can you use to load an assembly? (Each correct answer presents a complete solution. Choose two.)
Assembly.LoadLoadModuleassembly loadingreflection - Question #145
You need to retrieve an assembly's Version property. Which class should you use?
- Question #146
Why do managed languages use references and not pointers?
- Question #147
You need to trace the execution of an application that contains C# code and Microsoft Visual Basic .NET code. Which tool should you use?
- Question #148
What is an advantage of strongly typed code languages like .NET?
- Question #149
Which core technology allows interoperability between Microsoft Visual Basic .NET code and C# code?
- Question #150
Which collection enforces type safety?
- Question #151Understanding .NET Framework Concepts
You create a class that uses unmanaged resources. You need to ensure that users of the class can explicitly release resources when the instance of the class is no longer required....
IDisposableDispose methoddestructorunmanaged resources - Question #152
Value type variables are stored in the:
- Question #153
Managed code manages:
- Question #154
What does the .NET Framework use to pass data between managed and unmanaged code?
- Question #155
Common Intermediate Language (CIL) is converted into executable code by using:
- Question #156
When you delay sign a .NET assembly, the assembly will include:
- Question #157
You need to be able to install and uninstall an assembly from the Global Assembly Cache (GAC). Which tool should you use?
- Question #158Understanding Methods and Events
Which two types of actions can trigger an event? (Each correct answer presents a complete solution. Choose two.)
eventsdelegatesevent triggersuser interaction - Question #159
You write a method named DoWork. You need to log all exceptions that occur inside DoWork. You also need to ensure that all exceptions are raised to the calling code. Which code seg...
- Question #160
You need to handle only SqlException exceptions. You also need to ensure that any other exception flows back to the calling code. Which code segment should you use?
- Question #161
An event declaration is shown in the following code segment. Public Event NewProduct As NewProductEventHandler What is NewProductEventHandler in the event declaration?
- Question #162
In which file does a .NET Windows application store information that has been customized for a particular instance of the application?
- Question #163
Connection strings in the web.config file are:
- Question #164
You need to create an access rule that allows a user named UserA in MyDomain to read the contents of the Log.txt file. Which code segment should you use?
- Question #165
You need to encrypt data by using a public key and a private key. Which .NET class should you use?