August 2003
Intermediate to advanced
928 pages
32h 1m
English
TargetException
This exception is thrown when
you
attempt to invoke a nonstatic 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 : ApplicationException { // Public Constructors public TargetException( ); public TargetException(stringmessage); public TargetException(stringmessage, Exceptioninner); // Protected Constructors protected TargetException(System.Runtime.Serialization.SerializationInfoinfo, System.Runtime.Serialization.StreamingContextcontext); }
System.Object
→
System.Exception(System.Runtime.Serialization.ISerializable)
→
System.ApplicationException
→
TargetException