Which method should you use to write all buffered data in the stream to the device without losing any buffered data?

You are working as an application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Domain.com uses Visual Studio 2005 as an application platform. Domain.com consists of a Development department. You as the developer of Domain.com use a client computer named Certkiller -WS006 as developing collateral. You are busy using the XmlWriter class to write large amount of XML data to a physical device via a buffer stream.
Which method should you use to write all buffered data in the stream to the device without losing any buffered data?

You are working as an application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Domain.com uses Visual Studio 2005 as an application platform. Domain.com consists of a Development department. You as the developer of Domain.com use a client computer named Certkiller -WS006 as developing collateral. You are busy using the XmlWriter class to write large amount of XML data to a physical device via a buffer stream.
Which method should you use to write all buffered data in the stream to the device without losing any buffered data?

A.
WriteFullEndElement

B.
Flush

C.
Close

D.
WriteEndDocument

Explanation:
The flush method flushes the underlying stream by writing all buffered data to the underlying device and it does not loose any data.

Incorrect Answers:
A: The WriteFullEndElement method closes the current document which is open.
C: The Close method closes the underlying stream. This will cause you to loose data.
D: The WriteEndDocument method closes all the open documents.



Leave a Reply 0

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