This documentation is archived and is not being maintained.

ObjectDisposedException Constructor (String)

.NET Framework 1.1

Initializes a new instance of the ObjectDisposedException class with a string containing the name of the disposed object.

[Visual Basic]
Public Sub New( _
   ByVal objectName As String _
)
[C#]
public ObjectDisposedException(
   string objectName
);
[C++]
public: ObjectDisposedException(
   String* objectName
);
[JScript]
public function ObjectDisposedException(
   objectName : String
);

Parameters

objectName
A string containing the name of the disposed object.

Remarks

The Message property is initialized to a system-supplied message that describes the error and includes the objectName parameter. This message takes into account the current system culture.

The InnerException property of the new instance is initialized to a null reference (Nothing in Visual Basic).

If objectName is a null reference (Nothing), the Message property contains only an error message.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

ObjectDisposedException Class | ObjectDisposedException Members | System Namespace | ObjectDisposedException Constructor Overload List

Show: