Visual Basic (Declaration) | |
---|---|
Public Property ThrowExceptionsOnInvalidImages As Boolean |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public bool ThrowExceptionsOnInvalidImages {get; set;} |
Return Value
A value indicating whether to throw an exception instead of returning a null reference (Nothing in Visual Basic) on certain methods of this RasterCodecs object.
Visual Basic | Copy Code |
---|---|
Public Sub ThrowExceptionsOnInvalidImagesExample() |
C# | Copy Code |
---|---|
public void ThrowExceptionsOnInvalidImagesExample() |
Some of the methods of this RasterCodecs class will return an object when called. For example, the RasterCodecs.Load(String) method will return the RasterImage object created. If the value of ThrowExceptionsOnInvalidImages is set to true, then when the RasterCodecs.Load(String) method encounters an error and cannot return a valud image, it will throw an appropriate exception.
Set ThrowExceptionsOnInvalidImages to false to cause the RasterCodecs.Load(String) method to return a null reference (Nothing in Visual Basic) instead when it encounters an error and cannot return a valud image
The following methods will either throw an exception or return a null reference (Nothing in Visual Basic) depending on the setting of the ThrowExceptionsOnInvalidImages property.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family