FIX: The overridden method in the inherited class does not appear in the Method Name box in Visual Basic .NET 2003

Article translations Article translations
Article ID: 894392 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you inherit a class that inherits and overrides another class in Microsoft Visual Basic .NET 2003, the overridden method in the inherited class does not appear in the Method Name box. This problem occurs when you select (Overrides) in the Class Name box of the inherited class.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Basic .NET 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio .NET 2003 installed on the computer.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other software updates.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version      Size       File name
   ------------------------------------------------------
   17-Feb-2005  13:32  7.10.4355.0    598,016  Bcaut.dll
   17-Feb-2005  16:19  7.10.4355.0  1,441,792  Msvb7.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

  1. Start Visual Studio .NET 2003.
  2. On the File menu, click New, and then click Project.
  3. In the New Project dialog box, click Visual Basic Projects under Project Types, click Class Library under Project Templates, and then click OK.
  4. In Class1.vb, add the following code.
    Public Class Class1
            Public Overridable Sub MethodA()
            End Sub
            Public Overridable Sub MethodB()
            End Sub
        End Class
  5. On the File menu, click Add New Item.
  6. In the Add New Item dialog box, click Class under Templates, and then click Open.
  7. In Class2.vb, add the following code.
    Public Class Class2
            Inherits Class1
            Public Overrides Sub MethodA()
            End Sub
        End Class
  8. On the Build menu, click Build ClassLibrary1.
  9. Add a new Class Library project that is named ClassLibrary2 to this solution. To do this, follow these steps:
    1. On the File menu, click Add Project, and then click Add New Project.
    2. In the Add New Project dialog box, click Visual Basic Projects under Project Types, click Class Library under Templates, and then click OK.
  10. In ClassLibrary2, add a file reference to ClassLibrary1. To do this, follow these steps:
    1. In Solution Explorer, click ClassLibrary2, right-click References, and then click Add Reference.
    2. Click Browse, locate ClassLibrary1.dll, click Open, and then click OK.
  11. In Class1.vb, add the following code.
    Public Class Class1
            Inherits ClassLibrary1.Class2
        End Class
  12. In the Code Editor for Class1, click (Overrides) in the Class Name box.
  13. In the Code Editor for Class1, click the Method Name box. Only MethodB is displayed.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 894392 - Last Review: March 22, 2007 - Revision: 2.2
APPLIES TO
  • Microsoft Visual Basic .NET 2003 Standard Edition
Keywords: 
kbfix kbbug kbhotfixserver KB894392

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com