Visual Basic (Declaration) | |
---|---|
Public ReadOnly Property IsDisposed As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public bool IsDisposed {get;} |
Return Value
true if the RasterImage object has been disposed of; otherwise, false.This example will show the use of the IsDisposed property of a RasterImage object.
Visual Basic | Copy Code |
---|---|
Public Sub IsDisposedTest() |
C# | Copy Code |
---|---|
public void IsDisposedTest() |
When this property returns true, the RasterImage object is disposed of and can no longer be referenced as a valid object. Even though the instance of an object is disposed of, it is still maintained in memory until it is removed from memory through garbage collection. When an object is disposed, you should not check any other properties or call any other methods in the control or an NullReferenceException error will occur.
If it is required to track when a RasterImage object is disposed, use the Disposed event.
The RasterImage class implements the IDisposable interface, it is recommended that you follow the standard .NET dispose pattern when using the RasterImage class. For more information, refer to the IDisposable interface documentation in MSDN.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family