Can I use an Interface instead of Late Binding?
Posted on 2005-05-06
1)I have two child forms which both have a method with the same name and signature:
Public Sub initialize_validation()
For Each control As Control In util.get_controlTagCol(Me)
controlValidation.Control_Validating(control, Me.DefInstance, ErrorProvider1, Me.DefInstance.btnAddDisabled, False)
2)I would like to call this method from a third, parent form based on a reference passed for one of the two child forms.
if somethingTrue then
frm = childFormOne
frm = childFormTwo
4) I can accomplish this with late binding, if I turn off Option Strict. However, I would prefer not to have to use late binding. Does anyone know a better way? Perhaps with an Interface? (I have not used interefaces before, I have only read about them, and don't quite understand how to use them and if they will solve my issue here)