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?
A SoapFormatter= formatter = gcnew SoapFormatter();
array= buffer = gcnew array(dept->Capacity);
MemoryStream= stream = gcnew MemoryStream(buffer);
for each (Object= o in dept) {
formatter->Serialize(stream, o);
}B SoapFormatter= formatter = gcnew SoapFormatter();
MemoryStream= stream = gcnew MemoryStream();
for each (Object= o in dept) {
formatter->Serialize(stream, o);
}C SoapFormatter= formatter = gcnew SoapFormatter();
array= buffer = gcnew array(dept->Capacity);
MemoryStream= stream = gcnew MemoryStream(buffer);
formatter->Serialize(stream, dept);D SoapFormatter= formatter = gcnew SoapFormatter();
MemoryStream= stream = gcnew MemoryStream();
formatter->Serialize(stream, dept);
+ AnswerD
+ Report