Why is this method invisible to Visual Basic

Hi,

In a class written in C# I have the following method:

public abstract void OnExit(ref object state, object instance, object[] arguments,
Type[] genericTypeArguments, Type[] genericMethodArguments,
TypedReference returnValue, Exception exception);

I want to inherit this class in a VB project and to override this method:

Public Overrides Sub OnExit(ByRef state As Object, ByVal instance As Object, ByVal parameters() As Object, ByVal genericTypeArguments() As Type, ByVal genericMethodArguments() As Type, ByVal returnValue As TypedReference, ByVal exception As Exception)

However, the compiler complains and writes:

error BC30284: sub 'OnExit' cannot be declared 'Overrides' because it does not override a sub in a base class.

I suppose it is because of the TypedReference, but there is no documentation about this limitation.

Any idea?

Thank you.

Gael

[1340 byte] By [GaelFraiteur] at [2007-12-27]
# 1

I think you're right about the problem being TypedReference. That is a NON-CLSCompliant class and you're bound to run into a few problems using them.

Is in possible for you to pass it around as Object that way the inheritance would work.

JaredParsonsMSFT at 2007-9-5 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2
You are right, I will change the design to make it simpler... and compatible with VB!
GaelFraiteur at 2007-9-5 > top of Msdn Tech,Visual Basic,Visual Basic Language...