Question:You need to serialize an object of type List(Of Integer) in a binary format. The object is named data. Which code segment should you use? 

A Dim formatter As New BinaryFormatter()
Dim ms As New MemoryStream()
formatter.Serialize(ms, data) 

B Dim formatter As New BinaryFormatter()
Dim ms As New MemoryStream()
For i As Integer = 1 To 20
formatter.Serialize(ms, data(i - 1))
Next 

C Dim formatter As New BinaryFormatter()
Dim ms As New MemoryStream()
While ms.CanRead
formatter.Serialize(ms, data)
"A Composite Solution With Just One Click" - Certification Guaranteed 186 Microsoft 70-536 Exam
End While 

D Dim formatter As New BinaryFormatter()
Dim buffer As New Byte(data.Count) {}
Dim ms As New MemoryStream(buffer, True)
formatter.Serialize(ms, data) 

+ Answer
+ Report
Total Preview: 801

Copyright © 2024. Powered by Intellect Software Ltd