Which code segment should you insert at line 07?
You are developing an application by using C#. The application includes the following code segment. (Line numbers are included for reference only.) The DoWork() method must not throw any exceptions when converting the obj object to the IDataContainer interface or when accessing the Data property. You need to meet the...
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 GetAnimals() method must meet the following requirements: • Connect to a Microsoft SQL Server database. • Create Animal objects and populate them with data from the database. • Return a sequence...
Which access modifier should you use for the GetData() method?
An application includes a class named Person. The Person class includes a method named GetData. You need to ensure that the GetData() method can be used only by the Person class and not by any class derived from the Person class. Which access modifier should you use for the GetData()...
How should you complete the relevant code?
HOTSPOT You are implementing a library method that accepts a character parameter and returns a string. If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the method must return the value "invalid choice." You need to implement the lookup algorithm. How should you...
Which algorithm should you use?
You are developing an application that will transmit large amounts of data between a client computer and a server. You need to ensure the validity of the data by using a cryptographic hashing algorithm. Which algorithm should you use?A . RSAB . HMACSHA256C . AesD . RNGCryptoServiceProviderView AnswerAnswer: B Explanation:...
How should you complete the relevant code?
DRAG DROP An application serializes and deserializes XML from streams. The XML streams are in the following format: The application reads the XML streams by using a DataContractSerializer object that is declared by the following code segment: You need to ensure that the application preserves the element ordering as provided...
How should you complete the relevant code?
DRAG DROP You are developing an application that implements a set of custom exception types. You declare the custom exception types by using the following code segments: The application includes a function named DoWork that throws .NET Framework exceptions and custom exceptions. The application contains only the following logging methods:...
Which code segment should you insert at line 08?
You are developing an application that uses the Microsoft ADO.NET Entity Framework to retrieve order information from a Microsoft SQL Server database. The application includes the following code. (Line numbers are included for reference only.) The application must meet the following requirements: • Return only orders that have an OrderDate...
Which code segment should you use?
You are developing an application that uses structured exception handling. The application includes a class named Logger. The Logger class implements a method named Log by using the following code segment: public static void Log(Exception ex) { } You have the following requirements: • Log all exceptions by using the...
Which code segment should you use?
You are creating an application that manages information about zoo animals. The application includes a class named Animal and a method named Save. The Save () method must be strongly typed. It must allow only types inherited from the Animal class that uses a constructor that accepts no parameters. You...