Crse3359ae Lab01
You want to customize the way in which the values for certain members of the CRM and Customer class are stored in a target XML file during serialization. For this, you need to apply appropriate XML attributes to the members of the Customer and CRM class.
The principal tasks for this exercise are:
• Open an existing Console application.
• Apply XML attributes to the members of a class.
|
Tasks |
Supporting information |
|
1. Open an existing Console application. |
• Open Microsoft Visual Studio® 2005. • Locate and open the existing Console application crse3359ae_lab01.sln. • Use the E:\Labfiles\Starter\VB\crse3359ae_lab01 or E:\Labfiles\Starter\CS\crse3359ae_lab01 folder, depending on the language you are using. |
|
2. Apply XML attributes to the members of a class. |
• Open the Customer.vb or Customer.cs file from Solution Explorer, depending on the language you are using. • Define appropriate XML attributes for the members of the Customer class. • Apply appropriate XML attributes for the Customer class members, such as Name, City, and Type, to rename the elements and attributes and modify the structure of the resulting XML file. • In Solution Explorer, open the CRM.vb or CRM.cs file, depending on the language you are using. • Define appropriate XML attributes for the members of the CRM class. • Apply appropriate XML attributes for the CRM class to serialize the customer collection as a serialized array of Customer type. |
Post a comment