PrepAway - Latest Free Exam Questions & Answers

Category: 70-553

Exam 70-553: UPGRADE: MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 1

Which code segment should you use?

You are creating a class that performs complex financial calculations. The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate. You write serialized representations of the class. You need to write a code segment that updates the currRate variable with the current interest rate when an instance of the class is deserialized. Which code segment should you use?

What should you do?

You create an application for your business partners to submit purchase orders. The application deserializes XML documents sent by your partners into instances of an object named PurchaseOrder. You need to modify the application so that it collects details if the deserialization process encounters any XML content that fails to map to public members of the PurchaseOrder object.
What should you do?

What should you do?

You create a class library that contains the class hierarchy defined in the following code segment. (Line numbers are included for reference only.)

01 Public Class Group
02 Public Employees As Employee()
03 End Class
05 Public Class Employee
06 Public Name As String
07 End Class
09 Public Class Manager
10 Inherits Employee
11 Public Level As Integer
12 End Class

You create an instance of the Group class. You populate the fields of the instance. When you attempt to serialize the instance by using the Serialize method of the XmlSerializer class, you receive InvalidOperationException. You also receive the following error message: “There was an error generating the XML document.” You need to modify the code segment so that you can successfully serialize instances of the Group class by using the XmlSerializer class. You also need to ensure that the XML output contains an element for all public fields in the class hierarchy. What should you do?


Page 7 of 10« First...56789...Last »