Which class should you use?
You have an application that will send confidential information to a Web server.
You need to ensure that the data is encrypted when it is sent across the network.
Which class should you use?
Which code segment should you insert at line 03?
You are developing a game that allows players to collect from 0 through 1000 coins. You are creating a method
that will be used in the game. The method includes the following code. (Line numbers are included for
reference only.)
01 public string FormatCoins(string name, int coins)
02 {
03
04 }
The method must meet the following requirements:
• Return a string that includes the player name and the number of coins.
• Display the number of coins without leading zeros if the number is 1 or greater.
• Display the number of coins as a single 0 if the number is 0.
You need to ensure that the method meets the requirements.
Which code segment should you insert at line 03?
Which code segment should you use?
You are developing an application that retrieves patient data from a web service. The application stores the
JSON messages returned from the web service in a string variable named PatientAsJson. The variable is
encoded as UTF-8. The application includes a class named Patient that is defined by the following code:
You need to populate the Patient class with the data returned from the web service.
Which code segment should you use?
Which twoactions should you perform?
An application is throwing unhandled NullReferenceException and FormatException errors. The stack trace
shows that the exceptions occur in the GetWebResult() method.
The application includes the following code to parse XML data retrieved from a web service. (Line numbers are
included for reference only.)
You need to handle the exceptions without interfering with the existing error-handling infrastructure. Which twoactions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which type of collection should you use?
You need to store the values in a collection. The solution must meet the following requirements:
• The values must be stored in the order that they were added to the collection.
• The values must be accessed in a first-in, first-out order.
Which type of collection should you use?
You need to ensure that the class library assembly is s…
You are creating a class library that will be used in a web application.
You need to ensure that the class library assembly is strongly named.What should you do?
You need to ensure that the method extracts a list of U…
Which code should you insert at line 28?
Which code should you use to replace line 05?
You are developing an application.
The application contains the following code segment (line numbers are included for reference only):
When you run the code, you receive the following error message: “Cannot implicitly convert type ‘object” to ‘inf.
An explicit conversion exists (are you missing a cast?).”
You need to ensure that the code can be compiled.
Which code should you use to replace line 05?
You need to create a method that can be called by using…
You need to create a method that can be called by using a varying number of parameters.
What should you use?