Article ID: 819349
Article Last Modified on 5/16/2007
APPLIES TO
- Microsoft Visual Basic .NET 2002 Standard Edition
- Microsoft Visual Basic .NET 2003 Standard Edition
SYMPTOMS
You can pass an array as a base reference to the event in the ADDHANDLER statement or in the REMOVEHANDLER statement in your application. However, when you try to compile your application, the compiler stops responding instead of displaying compilation errors. When you close the Microsoft Visual Studio .NET IDE, you may receive the following error message:
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
Steps to Reproduce the Problem
- In Visual Studio .NET, start a new console application by using Visual Basic .NET.
By default, Module1 is created. - Add the following code to the Main procedure in Module1:
Dim a() As Integer 'Add a handler to the event of the array. AddHandler a.e, AddressOf Main RemoveHandler a.e, AddressOf Main
- On the Build menu, click Build Solution.
- In the Output window, you can see the following message:
However, the compilation is not completed. The compiler stops responding and does not show the errors in the code.
- On the Build menu, click Cancel to end the compilation.
- Close the IDE. You may receive the error message in the "Symptoms" section.
REFERENCES
For more information about events and event handlers, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/2z7x8ys3(vs.71).aspx
Keywords: kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbpending kbproperties kbevent kbcompiler kbbug KB819349