System.Messaging Reference (Document! X Sample)
Write Method (BinaryMessageFormatter)



System.Messaging Namespace > BinaryMessageFormatter Class : Write Method
The Message whose Message.Body property will contain the serialized object.
The object to be serialized into the message body.
Serializes an object into the body of the message.
Syntax
'Declaration
 
Public Sub Write( _
   ByVal message As Message, _
   ByVal obj As Object _
) 
'Usage
 
Dim instance As BinaryMessageFormatter
Dim message As Message
Dim obj As Object
 
instance.Write(message, obj)
public void Write( 
   Message message,
   object obj
)
public:
void Write( 
   Message^ message,
   Object^ obj
) 

Parameters

message
The Message whose Message.Body property will contain the serialized object.
obj
The object to be serialized into the message body.
Exceptions
ExceptionDescription
The message parameter is null.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

BinaryMessageFormatter Class
BinaryMessageFormatter Members