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



System.Messaging Namespace > BinaryMessageFormatter Class : CanRead Method
The Message to inspect.
Determines whether the formatter can deserialize the contents of the message.
Syntax
'Declaration
 
Public Function CanRead( _
   ByVal message As Message _
) As Boolean
'Usage
 
Dim instance As BinaryMessageFormatter
Dim message As Message
Dim value As Boolean
 
value = instance.CanRead(message)
public bool CanRead( 
   Message message
)
public:
bool CanRead( 
   Message^ message
) 

Parameters

message
The Message to inspect.

Return Value

true if the binary message formatter can deserialize the message; otherwise, false.
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