VB.NET Bug?

By Fons Sonnemans, posted on
1755 Views

I think I have found a Bug in VB.NET (Final)! I can't compile the following program (Build Error: 'Private Function Foo() As Integer' and 'Public Function Foo() As String' cannot overload each other because they differ only by return types. ). It worked in Beta2 of VB.NET.

Public Interface ITestInterface

   Function Foo() As Integer

End Interface

Public Class TestClass

   Implements ITestInterface

   Private Function Foo() As Integer Implements VBBug.ITestInterface.Foo
      Return 1
   End Function

   Public Function Foo() As String
      Return "2"
   End Function

End Class

Tags

VB

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.

Leave a comment

Blog comments

0 responses