PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which two code segments can you insert at line 05 to achieve this goal?

You are developing an application that generates code. The application includes the following code
segment. (Line numbers are included for reference only.)

You need to ensure that code generated by the GenerateCode() method represents a class that can
be accessed by all objects in its application domain.
Which two code segments can you insert at line 05 to achieve this goal? (Each correct answer
presents a complete solution. Choose two.)

Which code segment should you use?

You are developing an application that includes a class named Employee and a generic list of
employees. The following code segment declares the list of employees:
List<Employee> employeesList = new List<Employee>();
You populate the employeesList object with several hundred Employee objects.
The application must display the data for five Employee objects at a time.
You need to create a method that will return the correct number of Employee objects.
Which code segment should you use?

You need to ensure that the method meets the following requirements…

DRAG DROP
You have a method that will evaluate a parameter of type Int32 named Status.
You need to ensure that the method meets the following requirements:
If Status is set to Active, the method must return 1.
If Status is set to Inactive, the method must return 0.
If Status is any other value, the method must return -1.
What should you do? (To answer, drag the appropriate statement to the correct location in the
answer are
a. Each statement may be used once, more than once, or not at all. You may need to drag the split
bar between panes or scroll to view content.)

You need to ensure that after Proc1 executes, the database is left in a consistent state

DRAG DROP
You have an application that accesses a Microsoft SQL Server database.
The database contains a stored procedure named Proc1. Proc1 accesses several rows of data across
multiple tables.
You need to ensure that after Proc1 executes, the database is left in a consistent state. While Proc1
executes, no other operation can modify data already read or changed by Proc1. (Develop the
solution by selecting and ordering the required code snippets.
You may not need all of the code snippets.)

Which commands should you run?

DRAG DROP
You create an assembly named Assembly1.dll.
You need to ensure that Assembly1.dll can be deployed to the global assembly cache (GAC).

Which commands should you run? (To answer, drag the appropriate programs to the correct
locations. Each program may be used once, more than once, or not at all. You may need to drag the
split bar between panes or scroll to view content.)