This documentation is archived and is not being maintained.

ContextMarshalException Class

The exception that is thrown when an attempt to marshal an object across a context boundary fails.

For a list of all members of this type, see ContextMarshalException Members.


[Visual Basic]
Public Class ContextMarshalException
   Inherits SystemException
public class ContextMarshalException : SystemException
public __gc class ContextMarshalException : public SystemException
class ContextMarshalException extends SystemException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Objects can marshal by value or by reference. Any attempt to pass a type that cannot be marshaled through a context boundary will result in a ContextMarshalException.

ContextMarshalException uses the HRESULT COR_E_CONTEXTMARSHAL which has the value 0x80131504L.

ContextMarshalException uses the default Equals implementation, which supports reference equality.

For a list of initial property values for an instance of ContextMarshalException, see the ContextMarshalException constructors.


Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

ContextMarshalException Members | System Namespace | Exception | Handling and Throwing Exceptions