Which code segment should you use?

You are creating an application that manages information about your company's products. The application includes a class named Product and a method named Save. The Save() method must be strongly typed. It must allow only types inherited from the Product class that use a constructor that accepts no parameters. You...

April 28, 2020 No Comments READ MORE +

Which two actions should you perform?

You are developing an application that includes the following code segment. (Line numbers are included for reference only.) The GetCustomers() method must meet the following requirements: • Connect to a Microsoft SQL Server database. • Populate Customer objects with data from the database. • Return an IEnumerable<Customer> collection that contains...

April 28, 2020 No Comments READ MORE +

Which code segment should you insert at line 10?

An application receives JSON data in the following format: The application includes the following code segment. (Line numbers are included for reference only.) You need to ensure that the ConvertToName() method returns the JSON input string as a Name object. Which code segment should you insert at line 10?A ....

April 28, 2020 No Comments READ MORE +

Which garbage collector method should you use?

You are developing an application by using C#. The application includes an object that performs a long running process. You need to ensure that the garbage collector does not release the object's resources until the process completes. Which garbage collector method should you use?A . WaitForFullGCComplete()B . SuppressFinalize()C . collect()D...

March 16, 2019 No Comments READ MORE +

What should you do?

You use the Task.Run() method to launch a long-running data processing operation. The data processing operation often fails in times of heavy network congestion. If the data processing operation fails, a second operation must clean up any results of the first operation. You need to ensure that the second operation...

March 14, 2019 No Comments READ MORE +

Which collection type should you use?

You are developing an application that includes a class named Order. The application will store a collection of Order objects. The collection must meet the following requirements: • Internally store a key and a value for each collection item. • Provide objects to iterators in ascending order based on the...

March 14, 2019 No Comments READ MORE +

What are two possible ways to achieve this goal?

You are testing an application. The application includes methods named CalculateInterest and LogLine. The CalculateInterest() method calculates loan interest. The LogLine() method sends diagnostic messages to a console window. The following code implements the methods. (Line numbers are included for reference only.) You have the following requirements: • The Calculatelnterest()...

March 12, 2019 No Comments READ MORE +

Which code segment should you use?

You are creating a console application by using C#. You need to access the assembly found in the file named car.dll. Which code segment should you use?A . Assembly.Load();B . Assembly.GetExecutingAssembly();C . This.GetType();D . Assembly.LoadFile("car.dll");View AnswerAnswer: D Explanation: Assembly.LoadFile - Loads the contents of an assembly file on the specified...

March 11, 2019 No Comments READ MORE +

Which code segment should you use?

You are developing an application that will process orders. The debug and release versions of the application will display different logo images. You need to ensure that the correct image path is set based on the build configuration. Which code segment should you use? A . Option AB . Option...

March 10, 2019 No Comments READ MORE +

What should you do?

You use the Task.Run() method to launch a long-running data processing operation. The data processing operation often fails in times of heavy network congestion. If the data processing operation fails, a second operation must clean up any results of the first operation. You need to ensure that the second operation...

March 8, 2019 No Comments READ MORE +