Closes the System.Net.Sockets.NetworkStream.
The NetworkStream.Close method frees both unmanaged and managed resources associated with the System.Net.Sockets.NetworkStream. If the System.Net.Sockets.NetworkStream owns the underlying System.Net.Sockets.Socket, it is closed as well.
If a System.Net.Sockets.NetworkStream was associated with a System.Net.Sockets.TcpClient, the NetworkStream.Close method will close the TCP connection, but not dispose of the associated System.Net.Sockets.TcpClient.