Which code segment should you insert at line 03?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.

The application fills a DataSet object named custDS with customer records.
You write the following code segment. (Line numbers are included for reference only.)

01 System.IO.StreamWriter xmlSW =
02 new System.IO.StreamWriter("Customers.xml");
03
04 xmlSW.Close();

You need to write the content of the custDS object to the Customers.xml file as XML data along with inline XML schema.

Which code segment should you insert at line 03?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.

The application fills a DataSet object named custDS with customer records.
You write the following code segment. (Line numbers are included for reference only.)

01 System.IO.StreamWriter xmlSW =
02 new System.IO.StreamWriter("Customers.xml");
03
04 xmlSW.Close();

You need to write the content of the custDS object to the Customers.xml file as XML data along with inline XML schema.

Which code segment should you insert at line 03?

A.
xmlSW.Write(custDS.GetXml());

B.
xmlSW.Write(custDS.GetXmlSchema());

C.
custDS.WriteXml(xmlSW);

D.
custDS.WriteXml(xmlSW, XmlWriteMode.WriteSchema);



Leave a Reply 0

Your email address will not be published. Required fields are marked *