FIX: System.NullReferenceException error occurs if you assign a TreeView node tag property (316180)
The information in this article applies to:
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q316180 SYMPTOMS If you assign a value to a property of an ActiveX control
in Visual Basic .NET, you may receive the following error message when you run
your application: An unhandled exception of type
'System.NullReferenceException' occurred in <project name>.exe
Additional information: Object reference not set to an instance of an object.
Note The example that is used to reproduce this error message uses
the ActiveX version of the TreeView control. This error message may occur with other controls.
CAUSE The problem can occur because the Set method of the control expects a Reference type instead of a Value type, which results in the NullReferenceException. Visual Basic .NET always calls the Set method of a property if it is available. If you want to call the Let method, you need to specify the Let method explicitly. RESOLUTION Use one of the following methods to resolve this problem:
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This bug was corrected in Visual Studio .NET 2003.
Modification Type: | Minor | Last Reviewed: | 1/20/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbfix kbbug kberrmsg kbpending KB316180 |
---|
|