System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / Message Class / Message Constructor / Message Constructor(Object,IMessageFormatter)
The object to be serialized into the body of the message.
A IMessageFormatter that specifies the formatter with which to serialize the message body.



In This Topic
    Message Constructor(Object,IMessageFormatter)
    In This Topic
    Initializes a new instance of the Message class using the specified formatter to serialize the specified object into the body of the message.
    Syntax
    'Declaration
     
    
    Public Function New( _
       ByVal body As Object, _
       ByVal formatter As IMessageFormatter _
    )
    'Usage
     
    
    Dim body As Object
    Dim formatter As IMessageFormatter
     
    Dim instance As New Message(body, formatter)
    public Message( 
       object body,
       IMessageFormatter formatter
    )

    Parameters

    body
    The object to be serialized into the body of the message.
    formatter
    A IMessageFormatter that specifies the formatter with which to serialize the message body.
    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