A
AMerrell
Hello,
In C# I have seen subs overload each other that have the same signature. For example:
void IPostBackDataHandler.RaisePostDataChangedEvent()
{
((BasePostBackControl)this).RaisePostDataChangedEvent();
}
protected virtual void RaisePostDataChangedEvent()
{
}
To trasnlate this to VB.NET I came up with this:
Public Sub RaisePostDataChangedEvent() Implements IPostBackDataHandler.RaisePostDataChangedEvent
CType(Me, BasePostBackControl).RaisePostDataChangedEvent()
End Sub
Protected Overridable Sub RaisePostDataChangedEvent()
End Sub
Ofcourse I get the error that both have identical signatures. So, I rewrite them to this:
Public Overridable Sub RaisePostDataChangedEvent() Implements IPostBackDataHandler.RaisePostDataChangedEvent
End Sub
It clears up the Identical Signature problem but then the class that overrides this sub end up with different access level errors. And if I go with:
Protected Overridable Sub RaisePostDataChangedEvent()
End Sub
My IPostBackDataHandler implementation is in error. So my question is. How can I handle this in VB.NET?
Thanks for any help,
AM
In C# I have seen subs overload each other that have the same signature. For example:
void IPostBackDataHandler.RaisePostDataChangedEvent()
{
((BasePostBackControl)this).RaisePostDataChangedEvent();
}
protected virtual void RaisePostDataChangedEvent()
{
}
To trasnlate this to VB.NET I came up with this:
Public Sub RaisePostDataChangedEvent() Implements IPostBackDataHandler.RaisePostDataChangedEvent
CType(Me, BasePostBackControl).RaisePostDataChangedEvent()
End Sub
Protected Overridable Sub RaisePostDataChangedEvent()
End Sub
Ofcourse I get the error that both have identical signatures. So, I rewrite them to this:
Public Overridable Sub RaisePostDataChangedEvent() Implements IPostBackDataHandler.RaisePostDataChangedEvent
End Sub
It clears up the Identical Signature problem but then the class that overrides this sub end up with different access level errors. And if I go with:
Protected Overridable Sub RaisePostDataChangedEvent()
End Sub
My IPostBackDataHandler implementation is in error. So my question is. How can I handle this in VB.NET?
Thanks for any help,
AM