Hello,
I have a DLL which contains 3 different classes. These classes also contain events.
I also have a DropDownList control which allows a user to select from 3 different values, each of which corresponds to one of the 3 classes in the DLL.Code:} Class A DLL } Class B } Class C
How would I go about doing this since .NET will only allow me to create an object with events publicly.
So I can't do:
Any ideas how I could get around this?Code:If drpType.SelectedValue = 0 Then Dim WithEvents objDLL as New DLL.ClassA Elseif drpType.SelectValue = 1 Then Dim WithEvents objDLL as New DLL.ClassB Else Dim WithEvents objDLL as New DLL.ClassC End If
Cheers.




Reply With Quote