A BinaryFormatter= formatter = gcnew BinaryFormatter(); MemoryStream= stream = gcnew MemoryStream();
formatter->Serialize(stream, data);
B BinaryFormatter= formatter = gcnew BinaryFormatter(); MemoryStream= stream = gcnew MemoryStream();
Capture c(formatter,stream);
data->ForEach(gcnew Action<int>(%c,&Capture::Action));
C BinaryFormatter= formatter = gcnew BinaryFormatter();a rray<Byte>= buffer = gcnew array<Byte>(data->Count); MemoryStream= stream = gcnew MemoryStream(buffer, true); formatter->Serialize(stream, data);
D BinaryFormatter= formatter = gcnew BinaryFormatter(); MemoryStream= stream = gcnew MemoryStream();
for (int i = 0; i < data->Count; i++) {
formatter->Serialize(stream, data[i]);
}