READ Free Dumps For Microsoft- 70-483
Question ID 16998 | 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 throw an InvalidCastException exception if the obj object is not
of type IDataContainer when accessing the Data property.
You need to meet the requirements. Which code segment should you insert at line 07?
|
Option A | var dataContainer = (IDataContainer) obj;
|
Option B | var dataContainer = obj as IDataContainer;
|
Option C | var dataContainer = obj is IDataContainer;
|
Option D | dynamic dataContainer = obj;
|
Correct Answer | A |
Explanation Explanation: http://msdn.microsoft.com/en-us/library/ms173105.aspx
Question ID 16999 | You are developing an application. The application calls a method that returns an array of
integers named customerIds. You define an integer variable named customerIdToRemove
and assign a value to it. You declare an array named filteredCustomerIds.
You have the following requirements.
✑ Remove duplicate integers from the customerIds array.
✑ Sort the array in order from the highest value to the lowest value.
✑ Remove the integer value stored in the customerIdToRemove variable from the
customerIds array.
You need to create a LINQ query to meet the requirements.
Which code segment should you use?
|
Option A | Option A
|
Option B | Option B
|
Option C | Option C
|
Option D | Option D
|
Correct Answer | C |
Explanation