Partager via


LocalMessageReceiver.Dispose Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Stops the receiver from receiving messages and releases all resources used by the receiver.

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

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Sub Dispose
[SecuritySafeCriticalAttribute]
public void Dispose()

Implements

IDisposable.Dispose()

Remarks

You must call the Dispose method to stop receiving messages and to mark the LocalMessageReceiver as being available for garbage collection. If you do not call Dispose, the receiver will not be disposed until application shutdown.

For more information, see Communication Between Local Silverlight-Based Applications.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.