DatagramSocket.Close Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Closes the DatagramSocket object and aborts any pending operation on the DatagramSocket.
public:
virtual void Close() = Close;
void Close();
// This member is not implemented in C#
function close()
' This member is not implemented in VB.NET
Implements
Windows requirements
App capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
The Close method aborts any pending operations and releases all unmanaged resources associated with the DatagramSocket object.
Calling the Close method on the DatagramSocket also unregisters the MessageReceived event.
The Close method is used by Windows apps using JavaScript. For apps written using the .NET Framework 4.5 in C# and VB.NET, the Close method is exposed as the Dispose method on the DatagramSocket. For apps written in C++, the Close method is called when the object's destructor runs.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for