Question:You are writing an application that uses SOAP to exchange data with other applications.
You use a Department class that inherits from ArrayList to send objects to another application.
The Department object is named dept.
You need to ensure that the application serializes the Department object for transport by using
SOAP.
Which code should you use? - (Vb.Net) 

A Dim formatter As New SoapFormatter()
Dim buffer As bytes() = New Byte(dept.Capacity - 1) {}
Dim stream As New MemoryStream(buffer)
For Each o As Object In dept
formatter.Serialize(stream, o)
Next 

B Dim formatter As New SoapFormatter()
Dim buffer As bytes() = New Byte(dept.Capacity - 1) {}
Dim stream As New MemoryStream(buffer)
formatter.Serialize(stream, dept) 

C Dim formatter As New SoapFormatter()
Dim stream As New MemoryStream()
For Each o As Object In dept
formatter.Serialize(stream, o)
Next 

D Dim formatter As New SoapFormatter()
Dim stream As New MemoryStream()
formatter.Serialize(stream, dept) 

+ Answer
+ Report
Total Preview: 844

Copyright © 2024. Powered by Intellect Software Ltd