最新的Microsoft Programming in C# - 70-483免費考試真題
You are developing code for an application that retrieves information about Microsoft .NET Framework assemblies.
The following code segment is part of the application (line numbers are included for reference only):

You need to insert code at line 04. The code must load the assembly. Once the assembly is loaded, the code must be able to read the assembly metadata, but the code must be denied access from executing code from the assembly.
Which code segment should you insert at line 04?
The following code segment is part of the application (line numbers are included for reference only):

You need to insert code at line 04. The code must load the assembly. Once the assembly is loaded, the code must be able to read the assembly metadata, but the code must be denied access from executing code from the assembly.
Which code segment should you insert at line 04?
正確答案: D
說明:(僅 Fast2test 成員可見)
You have the following C# code.

What is the output of the code?

What is the output of the code?
正確答案: C
You are troubleshooting an application that uses a class named FullName. The class is decorated with the DataContractAttribute attribute. The application includes the following code. (Line numbers are included for reference only.)

You need to ensure that the entire FullName object is serialized to the memory stream object.
Which code segment should you insert at line 09?

You need to ensure that the entire FullName object is serialized to the memory stream object.
Which code segment should you insert at line 09?
正確答案: D
說明:(僅 Fast2test 成員可見)
You have the following code. (Line numbers are included for reference only).

You need to complete the WriteTextAsync method. The solution must ensure that the code is not blocked while the file is being written.
Which code should you insert at line 12?


You need to complete the WriteTextAsync method. The solution must ensure that the code is not blocked while the file is being written.
Which code should you insert at line 12?

正確答案: A
說明:(僅 Fast2test 成員可見)
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?

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?
正確答案: B
說明:(僅 Fast2test 成員可見)
You are developing an application that will be deployed to multiple computers. You set the assembly name.
You need to create a unique identity for the application assembly.
Which two assembly identity attributes should you include in the source code? (Each correct answer presents part of the solution. Choose two.)
You need to create a unique identity for the application assembly.
Which two assembly identity attributes should you include in the source code? (Each correct answer presents part of the solution. Choose two.)
正確答案: C,D
說明:(僅 Fast2test 成員可見)
You are developing an application.
The application contains the following code:

When you compile the code, you receive the following syntax error message: "A previous catch clause already catches all exceptions of this or a super type ('System.Exception')." You need to ensure that the code can be compiled. What should you do?
The application contains the following code:

When you compile the code, you receive the following syntax error message: "A previous catch clause already catches all exceptions of this or a super type ('System.Exception')." You need to ensure that the code can be compiled. What should you do?
正確答案: C
You are developing a C# application. The application includes a class named Rate. The following code segment implements the Rate class:

You define a collection of rates named rateCollection by using the following code segment:
Collection<Rate> rateCollection = new Collection<Rate>() ;
The application receives an XML file that contains rate information in the following format:

You need to parse the XML file and populate the rateCollection collection with Rate objects.
You have the following code:

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment 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 define a collection of rates named rateCollection by using the following code segment:
Collection<Rate> rateCollection = new Collection<Rate>() ;
The application receives an XML file that contains rate information in the following format:

You need to parse the XML file and populate the rateCollection collection with Rate objects.
You have the following code:

Which code segments should you include in Target 1, Target 2, Target 3 and Target 4 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. Each code segment 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:
* Target 1: The element name is rate not Ratesheet.
The Xmlreader readToFollowing reads until the named element is found.
* Target 2:
The following example gets the value of the first attribute.
reader.ReadToFollowing("book");
reader.MoveToFirstAttribute();
string genre = reader.Value;
Console.WriteLine("The genre value: " + genre);
* Target 3, Target 4:
The following example displays all attributes on the current node.
C#VB
if (reader.HasAttributes) {
Console.WriteLine("Attributes of <" + reader.Name + ">");
while (reader.MoveToNextAttribute()) {
Console.WriteLine(" {0}={1}", reader.Name, reader.Value);
}
// Move the reader back to the element node.
reader.MoveToElement();
}
The XmlReader.MoveToElement method moves to the element that contains the current attribute node.
Reference:
https://msdn.microsoft.com/en-us/library/System.Xml.XmlReader_methods(v=vs.110).aspx
You are debugging a 64-bit C# application.
Users report System.OutOfMemoryException exceptions. The system is attempting to use arrays larger than 2 GB in size.
You need to ensure that the application can use arrays larger than 2 GB.
What should you do?
Users report System.OutOfMemoryException exceptions. The system is attempting to use arrays larger than 2 GB in size.
You need to ensure that the application can use arrays larger than 2 GB.
What should you do?
正確答案: A
說明:(僅 Fast2test 成員可見)
You have the following code (line numbers are included for reference only):

To answer, complete each statement according to the information presented in the code.


To answer, complete each statement according to the information presented in the code.

正確答案:

You are developing an application that includes the following code segment:

You need to implement the Open() method of each interface in a derived class named UseResources and call the Open() method of each interface.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)


You need to implement the Open() method of each interface in a derived class named UseResources and call the Open() method of each interface.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)

正確答案: C,D
說明:(僅 Fast2test 成員可見)