NegotiateStream.Dispose Method

Implementations System.IDisposable.Dispose

Releases the unmanaged resources that are used by the current instance of the System.Net.Security.NegotiateStream class and, optionally, releases the managed resources.

Syntax

public void Dispose ();

Remarks

The Dispose method enables the current instance of the NegotiateStream class to be garbage collected. The Dispose method can be called multiple times by other objects. When called multiple times, the previous call to Dispose does not throw an exception and the method does nothing. To resume using the stream, you must create a new instance of the NegotiateStream class.

The default implementation of Dispose calls the Dispose(Boolean) method with a value of true.

The garbage collector throws an ObjectDisposedException if you try to access any members of the stream after calling the Dispose method.

Requirements

Product Latest Supported Latest
.NET 7.0 4.5 9.0
.NET Framework 4.8 4.0 4.8

See Also