Is something like this possible?
Namespace Transaction, Document
Class Signer
Public Sub New()
'Do Work
End Sub
End Class
End Namespace
I basically want to be able to instantiate the Signer class from either Namespace. The reason is that I mistakenly set it up in the Transaction class and need to migrate it over to the Document class without breaking existing legacy code. I'd prefer to not have the same Signer class duplicated in both Namespaces if possible.
I don't think you can do that. However, you CAN define the object in one namespace and then make a class of the same name in the other namespace that simply inherits the first class, like so:
Namespace Transaction
Class Signer
' Signer class implementation
End Class
End Namespace
Namespace Document
Class Signer
Inherits Transaction.Signer
End Class
End Namespace
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With