Which code segment should you use?

You are developing an application that uses structured exception handling. The application includes a class named ExceptionLogger. The ExceptionLogger class implements a method named LogException by using the following code segment: public static void LogException(Exception ex) You have the following requirements: • Log all exceptions by using the LogException() method...

May 13, 2020 No Comments READ MORE +

Which two assembly attributes should you include in the source code?

You are developing an application by using C#. You provide a public key to the development team during development. You need to specify that the assembly is not fully signed when it is built. Which two assembly attributes should you include in the source code? (Each correct answer presents part...

May 12, 2020 No Comments READ MORE +

Which code segment should you use?

You are developing an application. The application calls a method that returns an array of integers named employeeIds. You define an integer variable named employeeIdToRemove and assign a value to it. You declare an array named filteredEmployeeIds. You have the following requirements: • Remove duplicate integers from the employeeIds array....

May 12, 2020 No Comments READ MORE +

Which code segment should you use?

You are developing an application. The application includes a method named ReadFile that reads data from a file. The ReadFile() method must meet the following requirements: • It must not make changes to the data file. • It must allow other processes to access the data file. • It must...

May 12, 2020 No Comments READ MORE +

Which code segment should you insert at line 04?

You are implementing a method named FloorTemperature that performs conversions between value types and reference types. The following code segment implements the method. (Line numbers are included for reference only.) You need to ensure that the application does not throw exceptions on invalid conversions. Which code segment should you insert...

May 12, 2020 No Comments READ MORE +

How should you complete the relevant code?

DRAG DROP You are developing a custom collection named LoanCollection for a class named Loan class. You need to ensure that you can process each Loan object in the LoanCollection collection by using a foreach loop. How should you complete the relevant code? (To answer, drag the appropriate code segments...

May 12, 2020 No Comments READ MORE +

How should you complete the relevant code?

DRAG DROP You are developing an application that will include a method named GetData. The GetData() method will retrieve several lines of data from a web service by using a System.IO.StreamReader object. You have the following requirements: • The GetData() method must return a string value that contains the entire...

May 12, 2020 No Comments READ MORE +

How should you complete the relevant code?

DRAG DROP You are implementing a method that creates an instance of a class named User. The User class contains a public event named Renamed. The following code segment defines the Renamed event: Public event EventHandler<RenameEventArgs> Renamed; You need to create an event handler for the Renamed event by using...

May 12, 2020 No Comments READ MORE +

What should you do?

You are adding a public method named UpdateGrade to a public class named ReportCard. The code region that updates the grade field must meet the following requirements: • It must be accessed by only one thread at a time. • It must not be vulnerable to a deadlock situation. You...

May 12, 2020 No Comments READ MORE +

Which two actions should you perform?

You are creating a class named Employee. The class exposes a string property named EmployeeType. The following code segment defines the Employee class. (Line numbers are included for reference only.) The EmployeeType property value must be accessed and modified only by code within the Employee class or within a class...

May 12, 2020 No Comments READ MORE +