070-483 無料問題集「Microsoft Programming in C#」
You write the following code.

You need to get the list of all the types defined in the assembly that is being executed currently.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.


You need to get the list of all the types defined in the assembly that is being executed currently.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

正解:

Explanation:
The AppDomain.CurrentDomain.GetAssemblies() gives you all assemblies loaded in the current application domain.
The Assembly class provides a GetTypes() method to retrieve all types within that particular assembly.
Example: Using Linq:
IEnumerable<Type> types =
from a in AppDomain.CurrentDomain.GetAssemblies()
from t in a.GetTypes()
select t;
You are implementing a new method named ProcessData. The ProcessData() method calls a third-party component that performs a long-running operation.
The third-party component uses the IAsyncResult pattern to signal completion of the long-running operation.
You need to ensure that the calling code handles the long-running operation as a System.Threading.Tasks.Task object.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
The third-party component uses the IAsyncResult pattern to signal completion of the long-running operation.
You need to ensure that the calling code handles the long-running operation as a System.Threading.Tasks.Task object.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
正解:A、C
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You are developing an application that contains a class named TheaterCustomer and a method named ProcessTheaterCustomer. The ProcessTheaterCustomer() method accepts a TheaterCustomer object as the input parameter.
You have the following requirements:
Store the TheaterCustomer objects in a collection.
Ensure that the ProcessTheaterCustomer() method processes the TheaterCustomer objects in the order in which they are placed into the collection.
You need to meet the requirements.
What should you do?
You have the following requirements:
Store the TheaterCustomer objects in a collection.
Ensure that the ProcessTheaterCustomer() method processes the TheaterCustomer objects in the order in which they are placed into the collection.
You need to meet the requirements.
What should you do?
正解:D
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You have the following code.

You need to deserialize the stream1 parameter into the CompanyInfo class.
How should you complete the code?


You need to deserialize the stream1 parameter into the CompanyInfo class.
How should you complete the code?

正解:

You have the following code:

You need to display all of the vehicles that start with the letter "A".
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.


You need to display all of the vehicles that start with the letter "A".
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

正解:

You develop an application by using C#. The application counts the number of times a specific word appears within a set of text files. The application includes the following code. (Line numbers are included for reference only.)

You have the following requirements:
Populate the _wordCounts object with a list of words and the number of occurrences of each word.
Ensure that updates to the ConcurrentDictionary object can happen in parallel.
You need to complete the relevant code.
Which code segment should you insert at line 23?


You have the following requirements:
Populate the _wordCounts object with a list of words and the number of occurrences of each word.
Ensure that updates to the ConcurrentDictionary object can happen in parallel.
You need to complete the relevant code.
Which code segment should you insert at line 23?

正解:D
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You plan to create a list of customers named customers. Each customer will have a name and a key. The name and the key will be strings.
You will use the following code to retrieve customers from the list.
customers[aKey].toString();
You need to identify which class must be used to declare the customers list. The solution must ensure that each key is unique. Which class should you identify?
You will use the following code to retrieve customers from the list.
customers[aKey].toString();
You need to identify which class must be used to declare the customers list. The solution must ensure that each key is unique. Which class should you identify?
正解:A
解答を投票する
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 derived from the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete solution. Choose two.)

The EmployeeType property value must be accessed and modified only by code within the Employee class or within a class derived from the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete solution. Choose two.)
正解:B、C
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)