CanRead Method
Collapse the table of content
Expand the table of content

BinaryMessageFormatter.CanRead Method (Message)

 

Determines whether the formatter can deserialize the contents of the message.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public bool CanRead(
	Message message
)

Parameters

message
Type: System.Messaging.Message

The Message to inspect.

Return Value

Type: System.Boolean

true if the binary message formatter can deserialize the message; otherwise, false.

Exception Condition
ArgumentNullException

The message parameter is null.

CanRead returns false if the message body is not a binary object.

On the receiving computer, CanRead returns true if the assembly for the class to be deserialized exists locally. The assembly must be found in the global assembly cache, or be linked to the application (for example, if the object represents a custom class).

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft