Name

ObjectDisposedException

Synopsis

This exception is thrown when certain operations are performed on an object that has been disposed. For example, trying to read from an I/O stream that has been closed by the System.IO.Stream.Close() method should raise this exception.

Public Class ObjectDisposedException : Inherits InvalidOperationException
' Public Constructors
   Public Sub New( ByVal objectName As String) 
   Public Sub New(ByVal objectName As String, 
        ByVal message As String) 
' Protected Constructors
   Protected Sub New(
        ByVal info As System.Runtime.Serialization.SerializationInfo, 
        ByVal context As System.Runtime.Serialization.StreamingContext) 
' Public Instance Properties
   Overrides Public ReadOnly Property Message As String  
   Public ReadOnly Property ObjectName As String  
' Public Instance Methods
   Overrides Public Sub GetObjectData(
        ByVal info As System.Runtime.Serialization.SerializationInfo, 
        ByVal context As System.Runtime.Serialization.StreamingContext) 
End Class

Hierarchy

ObjectException(System.Runtime.Serialization.ISerializable)SystemExceptionInvalidOperationException ObjectDisposedException

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.