NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

NullReferenceException Class

Represents the exception that is thrown when there is an attempt to dereference a null object reference.

Object
   Exception
      SystemException
         NullReferenceException

[Visual Basic]
Public Class NullReferenceException
   Inherits SystemException
[C#]
public class NullReferenceException : SystemException
[C++]
public __gc class NullReferenceException : public SystemException
[JScript]
public class NullReferenceException extends SystemException

Remarks

The NullReferenceException is the exception class that is thrown when the access reference to a null reference is changed.

Requirements

Namespace: System

Assembly: mscorlib.dll

Example

The following code would cause a NullReferenceException to be thrown:

#import <mscorlib.dll>
#define NULL 0x00
void main() {  
  Object *obj = NULL;
  obj->ToString();
}

See Also

NullReferenceException Members | System Namespace