Which code segment should you insert at line 12?

You are developing a Windows Communication Foundation (WCF) service. The following
code defines and implements the service. (Line numbers are included for reference only.)
You need to ensure that two identical copies of the received message are created in the
service. Which code segment should you insert at line 12?

You are developing a Windows Communication Foundation (WCF) service. The following
code defines and implements the service. (Line numbers are included for reference only.)
You need to ensure that two identical copies of the received message are created in the
service. Which code segment should you insert at line 12?

A.
Message msgCopy = message; Message returnMsg = message;

B.
Message msgCopy = message. CreateBufferedCopy(8192) as Message; Message
returnMsg = message. CreateBufferedCopy(8192) as Message;

C.
MessageBuffer buffer = message. CreateBufferedCopy(8192); Message msgCopy =
buffer.CreateMessage(); Message returnMsg = buffer.CreateMessage();

D.
MessageBuffer buffer = message. CreateBufferedCopy(8192); Message msgCopy =
buffer.CreateMessage(); Message returnMsg = msgCopy;

Explanation:



Leave a Reply 0

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