john sutor <john_sutor@NOSPAM> wrote:
Can someone tell me the difference between the NullReferenceException and
the NullPointerException?
Also, please explain what they are.
NullPointerException is a Java exception - you may see it in J#, but
not otherwise (as far as I know).
NullReferenceException is the normal .NET one. Basically it indicates
that you're trying to "dereference" null. For instance:
string x = null;
int i = x.Length; // Nope - the value of x is null, not a reference
// to a valid string object!
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too