Name

TargetException

Synopsis

This exception is thrown when you attempt to invoke a nonshared method on a null object reference. (Note that in Beta1 of the .NET SDK, it was permissible to call a nonvirtual method against a null reference, so long as that method didn’t access any of the fields in the type. In Beta2 and beyond, this “feature” has been closed and removed.)

Public Class TargetException : Inherits ApplicationException
' Public Constructors
   Public Sub New() 
   Public Sub New( ByVal message As String) 
   Public Sub New(ByVal message As String, 
        ByVal inner As Exception) 
' Protected Constructors
   Protected Sub New(
        ByVal info As System.Runtime.Serialization.SerializationInfo, 
        ByVal context As System.Runtime.Serialization.StreamingContext) 
End Class

Hierarchy

System.ObjectSystem.Exception(System.Runtime.Serialization.ISerializable)System.ApplicationException TargetException

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.